original_string: public static function ordinalize($number)
      {
          static::init();
  
          if (\in_array($number % 100, range(11, 13), true)) {
              return $number . static::$ordinals['default'];
          }
  
          switch ($number % 10) {
              case 1:
                  return $number . static::$ordinals['first'];
              case 2:
                  return $number . static::$ordinals['second'];
              case 3:
                  return $number . static::$ordinals['third'];
              default:
                  return $number . static::$ordinals['default'];
          }
      }
code: public static function ordinalize($number)
      {
          static::init();
  
          if (\in_array($number % 100, range(11, 13), true)) {
              return $number . static::$ordinals['default'];
          }
  
          switch ($number % 10) {
              case 1:
                  return $number . static::$ordinals['first'];
              case 2:
                  return $number . static::$ordinals['second'];
              case 3:
                  return $number . static::$ordinals['third'];
              default:
                  return $number . static::$ordinals['default'];
          }
      }
code_tokens: public static function ordinalize ( $ number ) { static :: init ( ) ; if ( \ in_array ( $ number % 100 , range ( 11 , 13 ) , true ) ) { return $ number . static :: $ ordinals [ 'default' ] ; } switch ( $ number % 10 ) { case 1 : return $ number . static :: $ ordinals [ 'first' ] ; case 2 : return $ number . static :: $ ordinals [ 'second' ] ; case 3 : return $ number . static :: $ ordinals [ 'third' ] ; default : return $ number . static :: $ ordinals [ 'default' ] ; } }
docstring: Converts number to its ordinal English form.
  
  This method converts 13 to 13th, 2 to 2nd ...
  
  @param    int $number Number to get its ordinal value
  
  @return string Ordinal representation of given string.
docstring_tokens: Converts number to its ordinal English form .