original_string: private function castValue(string $value)
      {
          $value = $this->normalize($value);
          if (\preg_match('/^[0-9]+$/', $value)) {
              $value = (int)$value;
          } elseif (\preg_match('/^[0-9\.]+$/', $value)) {
              $value = (float)$value;
          } elseif (\preg_match('/^true|false$/', $value)) {
              $value = $value === 'true' ? true : false;
          }
          return $value;
      }
code: private function castValue(string $value)
      {
          $value = $this->normalize($value);
          if (\preg_match('/^[0-9]+$/', $value)) {
              $value = (int)$value;
          } elseif (\preg_match('/^[0-9\.]+$/', $value)) {
              $value = (float)$value;
          } elseif (\preg_match('/^true|false$/', $value)) {
              $value = $value === 'true' ? true : false;
          }
          return $value;
      }
code_tokens: private function castValue ( string $ value ) { $ value = $ this -> normalize ( $ value ) ; if ( \ preg_match ( '/^[0-9]+$/' , $ value ) ) { $ value = ( int ) $ value ; } elseif ( \ preg_match ( '/^[0-9\.]+$/' , $ value ) ) { $ value = ( float ) $ value ; } elseif ( \ preg_match ( '/^true|false$/' , $ value ) ) { $ value = $ value === 'true' ? true : false ; } return $ value ; }
docstring: Casts value to a specified type
  
  @param string $value
  @return mixed
docstring_tokens: Casts value to a specified type