Example #1
0
 /**
  * @param $string
  * @return string
  */
 protected function formatString($string)
 {
     if ($this->formatter instanceof \Closure) {
         $f = $this->formatter;
         return $f($string);
     }
     if ($this->formatter instanceof Formatter) {
         return $this->formatter->format($string);
     }
     return $string;
 }