original_string: public static function cast($value) {
  		$matches = array();
  		if(strtolower($value) === 'true') {
  			$value = (bool) true;
  		} else if(strtolower($value) === 'false') {
  			$value = (bool) false;
  		} else if(is_numeric($value)) {
  			$value = (int) $value;
  		} else if(preg_match('/^"(.*)"$/', $value, $matches)) {
  			$value = $matches[1];
  		}
  		return $value;
  	}
code: public static function cast($value) {
  		$matches = array();
  		if(strtolower($value) === 'true') {
  			$value = (bool) true;
  		} else if(strtolower($value) === 'false') {
  			$value = (bool) false;
  		} else if(is_numeric($value)) {
  			$value = (int) $value;
  		} else if(preg_match('/^"(.*)"$/', $value, $matches)) {
  			$value = $matches[1];
  		}
  		return $value;
  	}
code_tokens: public static function cast ( $ value ) { $ matches = array ( ) ; if ( strtolower ( $ value ) === 'true' ) { $ value = ( bool ) true ; } else if ( strtolower ( $ value ) === 'false' ) { $ value = ( bool ) false ; } else if ( is_numeric ( $ value ) ) { $ value = ( int ) $ value ; } else if ( preg_match ( '/^"(.*)"$/' , $ value , $ matches ) ) { $ value = $ matches [ 1 ] ; } return $ value ; }
docstring: Casts the value to the correct datatype.
  @param string $value the value to cast
  @return any
docstring_tokens: Casts the value to the correct datatype .