original_string: protected function getValueByAnnotatedType(ReflectionProperty $property, $value)
      {
          $comment = $property->getDocComment();
          if (preg_match('/@var (.+?)(\|null)? /', $comment, $matches)) {
              switch ($matches[1]) {
                  case 'integer':
                  case 'int':
                      $value = (int) $value;
                      break;
                  case 'float':
                      $value = (float) $value;
                      break;
              }
          }
  
          return $value;
      }
code: protected function getValueByAnnotatedType(ReflectionProperty $property, $value)
      {
          $comment = $property->getDocComment();
          if (preg_match('/@var (.+?)(\|null)? /', $comment, $matches)) {
              switch ($matches[1]) {
                  case 'integer':
                  case 'int':
                      $value = (int) $value;
                      break;
                  case 'float':
                      $value = (float) $value;
                      break;
              }
          }
  
          return $value;
      }
code_tokens: protected function getValueByAnnotatedType ( ReflectionProperty $ property , $ value ) { $ comment = $ property -> getDocComment ( ) ; if ( preg_match ( '/@var (.+?)(\|null)? /' , $ comment , $ matches ) ) { switch ( $ matches [ 1 ] ) { case 'integer' : case 'int' : $ value = ( int ) $ value ; break ; case 'float' : $ value = ( float ) $ value ; break ; } } return $ value ; }
docstring: Guesses and converts property type by phpdoc comment.
  
  @param ReflectionProperty $property
  @param  mixed $value
  @return mixed
docstring_tokens: Guesses and converts property type by phpdoc comment .