kahlan\matcher\ToHaveLength::actual PHP Method

actual() public static method

Normalize the actual value in the expected format.
public static actual ( mixed $actual ) : mixed
$actual mixed The actual value to be normalized.
return mixed The normalized value.
    public static function actual($actual)
    {
        if (is_string($actual)) {
            return strlen($actual);
        } elseif (is_array($actual) || $actual instanceof Countable) {
            return count($actual);
        }
    }