original_string: public static function abbreviate($text, $length = 20)
      {
          return (self::length($text) > $length)
              ? rtrim(self::substr($text, 0, round(($length - 3) / 2))) . '...' . ltrim(self::substr($text, (($length - 3) / 2) * -1))
              : $text;
      }
code: public static function abbreviate($text, $length = 20)
      {
          return (self::length($text) > $length)
              ? rtrim(self::substr($text, 0, round(($length - 3) / 2))) . '...' . ltrim(self::substr($text, (($length - 3) / 2) * -1))
              : $text;
      }
code_tokens: public static function abbreviate ( $ text , $ length = 20 ) { return ( self :: length ( $ text ) > $ length ) ? rtrim ( self :: substr ( $ text , 0 , round ( ( $ length - 3 ) / 2 ) ) ) . '...' . ltrim ( self :: substr ( $ text , ( ( $ length - 3 ) / 2 ) * - 1 ) ) : $ text ; }
docstring: Return an abbreviated string, with characters in the middle of the
  excessively long string replaced by '...'.
  
  @param string $text     The original string.
  @param integer $length  The length at which to abbreviate.
  
  @return string  The abbreviated string, if longer than $length.
docstring_tokens: Return an abbreviated string with characters in the middle of the excessively long string replaced by ... .