original_string: protected function _checkEntity($entity)
      {
          if (!$entity instanceof ArrayAccess && !is_array($entity)) {
              throw new RuntimeException(sprintf(
                  'Route `%s` expects the URL option `_entity` to be an array or object implementing \ArrayAccess, but `%s` passed.',
                  $this->template,
                  getTypeName($entity)
              ));
          }
      }
code: protected function _checkEntity($entity)
      {
          if (!$entity instanceof ArrayAccess && !is_array($entity)) {
              throw new RuntimeException(sprintf(
                  'Route `%s` expects the URL option `_entity` to be an array or object implementing \ArrayAccess, but `%s` passed.',
                  $this->template,
                  getTypeName($entity)
              ));
          }
      }
code_tokens: protected function _checkEntity ( $ entity ) { if ( ! $ entity instanceof ArrayAccess && ! is_array ( $ entity ) ) { throw new RuntimeException ( sprintf ( 'Route `%s` expects the URL option `_entity` to be an array or object implementing \ArrayAccess, but `%s` passed.' , $ this -> template , getTypeName ( $ entity ) ) ) ; } }
docstring: Checks that we really deal with an entity object
  
  @throws \RuntimeException
  @param \ArrayAccess|array $entity Entity value from the URL options
  @return void
docstring_tokens: Checks that we really deal with an entity object