Functional\Exceptions\InvalidArgumentException::assertCollectionAlike PHP Method

assertCollectionAlike() private static method

private static assertCollectionAlike ( $collection, string $className, string $callee, integer $parameterPosition )
$collection
$className string
$callee string
$parameterPosition integer
    private static function assertCollectionAlike($collection, $className, $callee, $parameterPosition)
    {
        if (!is_array($collection) && !$collection instanceof $className) {
            throw new static(sprintf('%s() expects parameter %d to be array or instance of %s', $callee, $parameterPosition, $className));
        }
    }