@@ -27,7 +27,7 @@ |
||
27 | 27 | return $output; |
28 | 28 | } |
29 | 29 | |
30 | - // this action needs to be removed by the user if they want to overwrite this functionality |
|
30 | + // this action needs to be removed by the user if they want to overwrite this functionality |
|
31 | 31 | public static function loadFunctionsFile($componentName) |
32 | 32 | { |
33 | 33 | $componentManager = ComponentManager::getInstance(); |
@@ -48,13 +48,13 @@ |
||
48 | 48 | return ''; |
49 | 49 | } |
50 | 50 | |
51 | - $area = function ($areaName) use ($areaHtml) { |
|
51 | + $area = function($areaName) use ($areaHtml) { |
|
52 | 52 | if (array_key_exists($areaName, $areaHtml)) { |
53 | 53 | return $areaHtml[$areaName]; |
54 | 54 | } |
55 | 55 | }; |
56 | 56 | |
57 | - $data = function () use ($componentData) { |
|
57 | + $data = function() use ($componentData) { |
|
58 | 58 | $args = func_get_args(); |
59 | 59 | array_unshift($args, $componentData); |
60 | 60 | return Helpers::extractNestedDataFromArray($args); |
@@ -15,20 +15,20 @@ |
||
15 | 15 | return self::$instance; |
16 | 16 | } |
17 | 17 | |
18 | - /** |
|
19 | - * clone |
|
20 | - * |
|
21 | - * Prevent cloning with 'protected' keyword |
|
22 | - **/ |
|
18 | + /** |
|
19 | + * clone |
|
20 | + * |
|
21 | + * Prevent cloning with 'protected' keyword |
|
22 | + **/ |
|
23 | 23 | protected function __clone() |
24 | 24 | { |
25 | 25 | } |
26 | 26 | |
27 | - /** |
|
28 | - * constructor |
|
29 | - * |
|
30 | - * Prevent instantiation with 'protected' keyword |
|
31 | - **/ |
|
27 | + /** |
|
28 | + * constructor |
|
29 | + * |
|
30 | + * Prevent instantiation with 'protected' keyword |
|
31 | + **/ |
|
32 | 32 | protected function __construct() |
33 | 33 | { |
34 | 34 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | // Convert ACF Field of type relationship to a Timber\Post and add all ACF Fields of that Post |
24 | 24 | add_filter('acf/format_value/type=relationship', NS . 'formatPostObject', 100); |
25 | -add_filter('get_twig', function ($twig) { |
|
25 | +add_filter('get_twig', function($twig) { |
|
26 | 26 | $twig->addExtension(new TwigExtensionFlynt()); |
27 | 27 | return $twig; |
28 | 28 | }); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | function formatGallery($value) |
39 | 39 | { |
40 | 40 | if (!empty($value)) { |
41 | - $value = array_map(function ($image) { |
|
41 | + $value = array_map(function($image) { |
|
42 | 42 | return new Image($image); |
43 | 43 | }, $value); |
44 | 44 | } |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | return $value; |
64 | 64 | } |
65 | 65 | |
66 | -add_action('timber/twig/filters', function ($twig) { |
|
67 | - $twig->addFunction(new \Twig_SimpleFunction('transparentPng', function ($aspect, $r = 0, $g = 0, $b = 0, $a = 127) { |
|
66 | +add_action('timber/twig/filters', function($twig) { |
|
67 | + $twig->addFunction(new \Twig_SimpleFunction('transparentPng', function($aspect, $r = 0, $g = 0, $b = 0, $a = 127) { |
|
68 | 68 | $ratio = aspectToRatio($aspect); |
69 | 69 | //create image with specified sizes |
70 | 70 | $image = imagecreatetruecolor($ratio['width'], $ratio['height']); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $k2 = 1; |
94 | 94 | $b = 1 / $n; |
95 | 95 | do { |
96 | - $b = 1/$b; |
|
96 | + $b = 1 / $b; |
|
97 | 97 | $a = floor($b); |
98 | 98 | $aux = $h1; |
99 | 99 | $h1 = $a * $h1 + $h2; |
@@ -115,8 +115,8 @@ discard block |
||
115 | 115 | return crypt(serialize($args), NONCE_SALT); |
116 | 116 | } |
117 | 117 | |
118 | -add_action('timber/twig/filters', function ($twig) { |
|
119 | - $twig->addFilter(new \Twig_SimpleFilter('resizeDynamic', function ($src, $w, $h = 0, $crop = 'default', $force = false) { |
|
118 | +add_action('timber/twig/filters', function($twig) { |
|
119 | + $twig->addFilter(new \Twig_SimpleFilter('resizeDynamic', function($src, $w, $h = 0, $crop = 'default', $force = false) { |
|
120 | 120 | $arguments = [ |
121 | 121 | 'src' => $src, |
122 | 122 | 'w' => $w, |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Flynt\Features\Components\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=ListTestimonialCards', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=ListTestimonialCards', function($data) { |
|
8 | 8 | Component::enqueueAssets('ListTestimonialCards'); |
9 | 9 | |
10 | 10 | return $data; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Flynt\Features\Components\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=ListFacts', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=ListFacts', function($data) { |
|
8 | 8 | Component::enqueueAssets('ListFacts', [ |
9 | 9 | [ |
10 | 10 | 'name' => 'countup', |
@@ -5,7 +5,7 @@ |
||
5 | 5 | // use Flynt\Utils\Asset; |
6 | 6 | use Flynt\Features\Components\Component; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=GridPostsSlider', function ($data) { |
|
8 | +add_filter('Flynt/addComponentData?name=GridPostsSlider', function($data) { |
|
9 | 9 | Component::enqueueAssets('GridPostsSlider', [ |
10 | 10 | [ |
11 | 11 | 'name' => 'slick-carousel', |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * |
16 | 16 | * @since 0.1.0 |
17 | 17 | * |
18 | - * @param string $feature Name of the feature. |
|
18 | + * @param string $featureName Name of the feature. |
|
19 | 19 | * |
20 | 20 | * @return array|null Returns an array of options or null if the feature wasn't found. |
21 | 21 | */ |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * |
33 | 33 | * @since 0.1.0 |
34 | 34 | * |
35 | - * @param string $feature Name of the feature. |
|
35 | + * @param string $featureName Name of the feature. |
|
36 | 36 | * @param string $key The option key. |
37 | 37 | * |
38 | 38 | * @return mixed|null Returns the option or null if the option / the feature doesn't exist. |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | * |
64 | 64 | * @since 0.1.0 |
65 | 65 | * |
66 | - * @param string $feature Name of the feature. |
|
66 | + * @param string $featureName Name of the feature. |
|
67 | 67 | * @param string $basePath The feature base path. |
68 | 68 | * @param array $options An array of options. Optional. |
69 | 69 | * |
70 | - * @return boolean |
|
70 | + * @return boolean|null |
|
71 | 71 | */ |
72 | 72 | public static function register($featureName, $basePath, $options = []) |
73 | 73 | { |
@@ -3,7 +3,7 @@ |
||
3 | 3 | use ACFComposer\ACFComposer; |
4 | 4 | use function Flynt\Features\AcfGutenberg\registerGutenbergComponents; |
5 | 5 | |
6 | -add_action('acf/init', function () { |
|
6 | +add_action('acf/init', function() { |
|
7 | 7 | $pageComponents = [ |
8 | 8 | 'Flynt/Components/AccordionDefault/Fields/Layout', |
9 | 9 | 'Flynt/Components/BlockImage/Fields/Layout', |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use ACFComposer\ACFComposer; |
4 | 4 | |
5 | -add_action('acf/init', function () { |
|
5 | +add_action('acf/init', function() { |
|
6 | 6 | $postComponents = [ |
7 | 7 | 'Flynt/Components/BlockImage/Fields/Layout', |
8 | 8 | 'Flynt/Components/BlockWysiwyg/Fields/Layout', |