original_string: protected function _checkViewVars(&$item, $key)
      {
          if ($item instanceof Exception) {
              $item = (string)$item;
          }
  
          if (is_resource($item) ||
              $item instanceof Closure ||
              $item instanceof PDO
          ) {
              throw new RuntimeException(sprintf(
                  'Failed serializing the `%s` %s in the `%s` view var',
                  is_resource($item) ? get_resource_type($item) : get_class($item),
                  is_resource($item) ? 'resource' : 'object',
                  $key
              ));
          }
      }
code: protected function _checkViewVars(&$item, $key)
      {
          if ($item instanceof Exception) {
              $item = (string)$item;
          }
  
          if (is_resource($item) ||
              $item instanceof Closure ||
              $item instanceof PDO
          ) {
              throw new RuntimeException(sprintf(
                  'Failed serializing the `%s` %s in the `%s` view var',
                  is_resource($item) ? get_resource_type($item) : get_class($item),
                  is_resource($item) ? 'resource' : 'object',
                  $key
              ));
          }
      }
code_tokens: protected function _checkViewVars ( & $ item , $ key ) { if ( $ item instanceof Exception ) { $ item = ( string ) $ item ; } if ( is_resource ( $ item ) || $ item instanceof Closure || $ item instanceof PDO ) { throw new RuntimeException ( sprintf ( 'Failed serializing the `%s` %s in the `%s` view var' , is_resource ( $ item ) ? get_resource_type ( $ item ) : get_class ( $ item ) , is_resource ( $ item ) ? 'resource' : 'object' , $ key ) ) ; } }
docstring: Iterates through hash to clean up and normalize.
  
  @param mixed $item Reference to the view var value.
  @param string $key View var key.
  @return void
docstring_tokens: Iterates through hash to clean up and normalize .