private function isCollection($property, $value)
    {
        if (!$value instanceof Collection) {
            $got = is_object($value) ? get_class($value) : gettype($value);

            throw new \InvalidArgumentException(
                sprintf('Value of "%s" property must be an instance of Collection, got %s.', $property, $got)
            );
        }
    }
private function isCollection($property, $value)
    {
        if (!$value instanceof Collection) {
            $got = is_object($value) ? get_class($value) : gettype($value);

            throw new \InvalidArgumentException(
                sprintf('Value of "%s" property must be an instance of Collection, got %s.', $property, $got)
            );
        }
    }
private function isCollection ( $ property , $ value ) { if ( ! $ value instanceof Collection ) { $ got = is_object ( $ value ) ? get_class ( $ value ) : gettype ( $ value ) ; throw new \ InvalidArgumentException ( sprintf ( 'Value of "%s" property must be an instance of Collection, got %s.' , $ property , $ got ) ) ; } }
Check if value is instance of Collection.

@param string $property
@param mixed $value

@throws \InvalidArgumentException
Check if value is instance of Collection .