for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Sludio\HelperBundle\Script\Twig;
trait TwigTrait
{
protected $shortFunctions;
public function makeArray(array $input, $type = 'filter')
$output = [];
$class = '\\Twig_Simple'.ucfirst($type);
foreach ($input as $call => $function) {
$output[] = new $class('sludio_'.$call, [
$this,
$function,
]);
if ($this->shortFunctions) {
$output[] = new $class($call, [
}
return $output;