original_string: 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
                      )
                  );
              }
          }
      }
code: 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
                      )
                  );
              }
          }
      }
code_tokens: 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 ) ) ; } } }
docstring: Checks if only valid cookie objects are in the array
  
  @param array $cookies Array of cookie objects
  @return void
  @throws \InvalidArgumentException
docstring_tokens: Checks if only valid cookie objects are in the array