protected function checkCookies(array $cookies)
    {
        foreach ($cookies as $index => $cookie) {
            if (!$cookie instanceof CookieInterface) {
                throw new InvalidArgumentException(
                    sprintf(
                        'Expected `%s[]` as $cookies but instead got `%s` at index %d',
                        static::class,
                        getTypeName($cookie),
                        $index
                    )
                );
            }
        }
    }
protected function checkCookies(array $cookies)
    {
        foreach ($cookies as $index => $cookie) {
            if (!$cookie instanceof CookieInterface) {
                throw new InvalidArgumentException(
                    sprintf(
                        'Expected `%s[]` as $cookies but instead got `%s` at index %d',
                        static::class,
                        getTypeName($cookie),
                        $index
                    )
                );
            }
        }
    }
protected function checkCookies ( array $ cookies ) { foreach ( $ cookies as $ index => $ cookie ) { if ( ! $ cookie instanceof CookieInterface ) { throw new InvalidArgumentException ( sprintf ( 'Expected `%s[]` as $cookies but instead got `%s` at index %d' , static :: class , getTypeName ( $ cookie ) , $ index ) ) ; } } }
Checks if only valid cookie objects are in the array

@param array $cookies Array of cookie objects
@return void
@throws \InvalidArgumentException
Checks if only valid cookie objects are in the array