@@ -36,9 +36,9 @@ discard block |
||
| 36 | 36 | return $output; |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - $addArea = function ($twig) use ($areaHtml) { |
|
| 39 | + $addArea = function($twig) use ($areaHtml) { |
|
| 40 | 40 | |
| 41 | - $twig->addFunction(new Twig_SimpleFunction('area', function ($areaName) use ($areaHtml) { |
|
| 41 | + $twig->addFunction(new Twig_SimpleFunction('area', function($areaName) use ($areaHtml) { |
|
| 42 | 42 | if (array_key_exists($areaName, $areaHtml)) { |
| 43 | 43 | return $areaHtml[$areaName]; |
| 44 | 44 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | add_filter('get_twig', $addArea); |
| 51 | 51 | |
| 52 | - $returnTimberPaths = function ($paths) use ($filePath) { |
|
| 52 | + $returnTimberPaths = function($paths) use ($filePath) { |
|
| 53 | 53 | array_unshift($paths, dirname($filePath)); |
| 54 | 54 | return $paths; |
| 55 | 55 | }; |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | function formatGallery($value) |
| 77 | 77 | { |
| 78 | 78 | if (!empty($value)) { |
| 79 | - $value = array_map(function ($image) { |
|
| 79 | + $value = array_map(function($image) { |
|
| 80 | 80 | return new Image($image); |
| 81 | 81 | }, $value); |
| 82 | 82 | } |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | return $value; |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | -add_action('timber/twig/filters', function ($twig) { |
|
| 105 | - $twig->addFunction(new \Twig_SimpleFunction('transparentPng', function ($aspect, $r = 0, $g = 0, $b = 0, $a = 127) { |
|
| 104 | +add_action('timber/twig/filters', function($twig) { |
|
| 105 | + $twig->addFunction(new \Twig_SimpleFunction('transparentPng', function($aspect, $r = 0, $g = 0, $b = 0, $a = 127) { |
|
| 106 | 106 | $ratio = aspectToRatio($aspect); |
| 107 | 107 | //create image with specified sizes |
| 108 | 108 | $image = imagecreatetruecolor($ratio['width'], $ratio['height']); |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $k2 = 1; |
| 132 | 132 | $b = 1 / $n; |
| 133 | 133 | do { |
| 134 | - $b = 1/$b; |
|
| 134 | + $b = 1 / $b; |
|
| 135 | 135 | $a = floor($b); |
| 136 | 136 | $aux = $h1; |
| 137 | 137 | $h1 = $a * $h1 + $h2; |
@@ -153,8 +153,8 @@ discard block |
||
| 153 | 153 | return crypt(serialize($args), NONCE_SALT); |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | -add_action('timber/twig/filters', function ($twig) { |
|
| 157 | - $twig->addFilter(new \Twig_SimpleFilter('resizeDynamic', function ($src, $w, $h = 0, $crop = 'default', $force = false) { |
|
| 156 | +add_action('timber/twig/filters', function($twig) { |
|
| 157 | + $twig->addFilter(new \Twig_SimpleFilter('resizeDynamic', function($src, $w, $h = 0, $crop = 'default', $force = false) { |
|
| 158 | 158 | $arguments = [ |
| 159 | 159 | 'src' => $src, |
| 160 | 160 | 'w' => $w, |