original_string: protected function forceTypes($data)
      {
          if (in_array($data, array('true', 'false')))
          {
              $data = ($data === 'true' ? 1 : 0);
          }
          else if (is_numeric($data))
          {
              $data = (int) $data;
          }
          else if (gettype($data) === 'array')
          {
              foreach($data as $key=>$value)
              {
                  $data[$key] = $this->forceTypes($value);
              }
          }
  
          return $data;
      }
code: protected function forceTypes($data)
      {
          if (in_array($data, array('true', 'false')))
          {
              $data = ($data === 'true' ? 1 : 0);
          }
          else if (is_numeric($data))
          {
              $data = (int) $data;
          }
          else if (gettype($data) === 'array')
          {
              foreach($data as $key=>$value)
              {
                  $data[$key] = $this->forceTypes($value);
              }
          }
  
          return $data;
      }
code_tokens: protected function forceTypes ( $ data ) { if ( in_array ( $ data , array ( 'true' , 'false' ) ) ) { $ data = ( $ data === 'true' ? 1 : 0 ) ; } else if ( is_numeric ( $ data ) ) { $ data = ( int ) $ data ; } else if ( gettype ( $ data ) === 'array' ) { foreach ( $ data as $ key => $ value ) { $ data [ $ key ] = $ this -> forceTypes ( $ value ) ; } } return $ data ; }
docstring: Cast values to native PHP variable types.
  
  @param  mixed  $data
  @return mixed
docstring_tokens: Cast values to native PHP variable types .