Completed
Push — constructionplanless ( f41850...ef3709 )
by Dominik
01:29
created
Features/TimberLoader/functions.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,
Please login to merge, or discard this patch.
inc/Utils/Feature.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Components/GridDownloadPortrait/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,11 +5,11 @@
 block discarded – undo
5 5
 use Flynt\Utils\Component;
6 6
 use Flynt;
7 7
 
8
-add_filter('Flynt/addComponentData?name=GridDownloadPortrait', function ($data) {
8
+add_filter('Flynt/addComponentData?name=GridDownloadPortrait', function($data) {
9 9
     Component::enqueueAssets('GridDownloadPortrait');
10 10
 
11 11
     if (!empty($data['items'])) {
12
-        $data['items'] = array_map(function ($item) {
12
+        $data['items'] = array_map(function($item) {
13 13
             if ($item['itemType'] === 'itemFile') {
14 14
                 $fileSize = filesize(get_attached_file($item['file']['id']));
15 15
                 $item['file']['fileSize'] = size_format($fileSize);
Please login to merge, or discard this patch.
Components/GridContentLists/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Flynt\Utils\Component;
6 6
 use Flynt;
7 7
 
8
-add_filter('Flynt/addComponentData?name=GridContentLists', function ($data) {
8
+add_filter('Flynt/addComponentData?name=GridContentLists', function($data) {
9 9
     Component::enqueueAssets('GridContentLists');
10 10
 
11 11
     return $data;
Please login to merge, or discard this patch.
Components/HeroCta/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Flynt\Utils\Component;
6 6
 use Flynt;
7 7
 
8
-add_filter('Flynt/addComponentData?name=HeroCta', function ($data) {
8
+add_filter('Flynt/addComponentData?name=HeroCta', function($data) {
9 9
     Component::enqueueAssets('HeroCta');
10 10
 
11 11
     return $data;
Please login to merge, or discard this patch.
Components/GridPosts/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Flynt\Utils\Component;
6 6
 use Flynt;
7 7
 
8
-add_filter('Flynt/addComponentData?name=GridPosts', function ($data) {
8
+add_filter('Flynt/addComponentData?name=GridPosts', function($data) {
9 9
     Component::enqueueAssets('GridPosts');
10 10
 
11 11
     return $data;
Please login to merge, or discard this patch.
Components/BlockWysiwyg/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Flynt\Utils\Component;
6 6
 use Flynt;
7 7
 
8
-add_filter('Flynt/addComponentData?name=BlockWysiwyg', function ($data) {
8
+add_filter('Flynt/addComponentData?name=BlockWysiwyg', function($data) {
9 9
     Component::enqueueAssets('BlockWysiwyg');
10 10
 
11 11
     return $data;
Please login to merge, or discard this patch.
Components/ListPosts/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 use Flynt\Utils\Options;
7 7
 use Flynt;
8 8
 
9
-add_filter('Flynt/addComponentData?name=ListPosts', function ($data) {
9
+add_filter('Flynt/addComponentData?name=ListPosts', function($data) {
10 10
     Component::enqueueAssets('ListPosts');
11 11
     $data['isArchive'] = is_home() || is_archive();
12 12
 
Please login to merge, or discard this patch.
Components/HeroImage/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Flynt\Utils\Component;
6 6
 use Flynt;
7 7
 
8
-add_filter('Flynt/addComponentData?name=HeroImage', function ($data) {
8
+add_filter('Flynt/addComponentData?name=HeroImage', function($data) {
9 9
     Component::enqueueAssets('HeroImage', [
10 10
         [
11 11
             'name' => 'lazysizes',
Please login to merge, or discard this patch.