original_string: public function makeTwigFunctions($functions = [])
      {
          if (!is_array($functions)) {
              $functions = [];
          }
  
          foreach ($this->listFunctions() as $name => $callable) {
  
              /*
               * Handle a wildcard function
               */
              if (strpos($name, '*') !== false && $this->isWildCallable($callable)) {
                  $callable = function ($name) use ($callable) {
                      $arguments = array_slice(func_get_args(), 1);
                      $method = $this->isWildCallable($callable, Str::camel($name));
                      return call_user_func_array($method, $arguments);
                  };
              }
  
              if (!is_callable($callable)) {
                  throw new ApplicationException(sprintf('The markup function for %s is not callable.', $name));
              }
  
              $functions[] = new Twig_SimpleFunction($name, $callable, ['is_safe' => ['html']]);
          }
  
          return $functions;
      }
code: public function makeTwigFunctions($functions = [])
      {
          if (!is_array($functions)) {
              $functions = [];
          }
  
          foreach ($this->listFunctions() as $name => $callable) {
  
              /*
               * Handle a wildcard function
               */
              if (strpos($name, '*') !== false && $this->isWildCallable($callable)) {
                  $callable = function ($name) use ($callable) {
                      $arguments = array_slice(func_get_args(), 1);
                      $method = $this->isWildCallable($callable, Str::camel($name));
                      return call_user_func_array($method, $arguments);
                  };
              }
  
              if (!is_callable($callable)) {
                  throw new ApplicationException(sprintf('The markup function for %s is not callable.', $name));
              }
  
              $functions[] = new Twig_SimpleFunction($name, $callable, ['is_safe' => ['html']]);
          }
  
          return $functions;
      }
code_tokens: public function makeTwigFunctions ( $ functions = [ ] ) { if ( ! is_array ( $ functions ) ) { $ functions = [ ] ; } foreach ( $ this -> listFunctions ( ) as $ name => $ callable ) { /*
               * Handle a wildcard function
               */ if ( strpos ( $ name , '*' ) !== false && $ this -> isWildCallable ( $ callable ) ) { $ callable = function ( $ name ) use ( $ callable ) { $ arguments = array_slice ( func_get_args ( ) , 1 ) ; $ method = $ this -> isWildCallable ( $ callable , Str :: camel ( $ name ) ) ; return call_user_func_array ( $ method , $ arguments ) ; } ; } if ( ! is_callable ( $ callable ) ) { throw new ApplicationException ( sprintf ( 'The markup function for %s is not callable.' , $ name ) ) ; } $ functions [ ] = new Twig_SimpleFunction ( $ name , $ callable , [ 'is_safe' => [ 'html' ] ] ) ; } return $ functions ; }
docstring: Makes a set of Twig functions for use in a twig extension.
  @param  array $functions Current collection
  @return array
docstring_tokens: Makes a set of Twig functions for use in a twig extension .