Completed
Push — componentlibrary ( 3f9ee5...0c533c )
by
unknown
01:45
created
Features/Lodash/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Utils\Asset;
6 6
 
7
-add_action('wp_enqueue_scripts', function () {
7
+add_action('wp_enqueue_scripts', function() {
8 8
     Asset::register([
9 9
         'type' => 'script',
10 10
         'name' => 'Flynt/Features/Lodash',
Please login to merge, or discard this patch.
Features/BaseStyle/functions.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -2,9 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Flynt\Features\BaseStyle;
4 4
 
5
-use Timber\Timber;
6
-use Flynt\ComponentManager;
7
-
8 5
 if (current_user_can('editor') || (WP_ENV !== 'production')) {
9 6
     add_filter('init', 'Flynt\Features\BaseStyle\registerRewriteRule');
10 7
     add_filter('template_include', 'Flynt\Features\BaseStyle\templateInclude');
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
 function disallowRobots()
17 17
 {
18 18
     if (defined('WPSEO_VERSION')) {
19
-        add_filter('wpseo_robots', function () {
19
+        add_filter('wpseo_robots', function() {
20 20
             return "noindex,nofollow";
21 21
         });
22 22
     } else {
23 23
         remove_action('wp_head', 'noindex', 1);
24
-        add_action('wp_head', function () {
24
+        add_action('wp_head', function() {
25 25
             echo "<meta name='robots' content='noindex,nofollow' />\n";
26 26
         });
27 27
     }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     $rules = get_option('rewrite_rules');
38 38
 
39
-    if (! isset($rules["{$routeName}/(.*?)/?$"])) {
39
+    if (!isset($rules["{$routeName}/(.*?)/?$"])) {
40 40
         flush_rewrite_rules();
41 41
     }
42 42
 }
Please login to merge, or discard this patch.
Components/BlockBaseStyle/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=BlockBaseStyle', function ($data) {
8
-    add_action('wp_enqueue_scripts', function () {
7
+add_filter('Flynt/addComponentData?name=BlockBaseStyle', function($data) {
8
+    add_action('wp_enqueue_scripts', function() {
9 9
         Component::enqueueAssets('BlockBaseStyle');
10 10
     });
11 11
     return $data;
Please login to merge, or discard this patch.
Features/YoutubeNoCookieEmbed/functions.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Flynt\Features\YoutubeNoCookieEmbed;
4 4
 
5
-use Flynt\Utils\Oembed;
6
-
7 5
 add_action('oembed_result', 'Flynt\Features\YoutubeNoCookieEmbed\setNoCookieDomain', 10, 2);
8 6
 add_filter('embed_oembed_html', 'Flynt\Features\YoutubeNoCookieEmbed\setNoCookieDomain', 10, 2);
9 7
 
Please login to merge, or discard this patch.
Components/BlockImageText/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=BlockImageText', function ($data) {
8
-    add_action('wp_enqueue_scripts', function () {
7
+add_filter('Flynt/addComponentData?name=BlockImageText', function($data) {
8
+    add_action('wp_enqueue_scripts', function() {
9 9
         Component::enqueueAssets('BlockImageText', [
10 10
             [
11 11
                 'name' => 'lazysizes',
Please login to merge, or discard this patch.
Components/BlockVideoOembed/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
 use Flynt\Features\Components\Component;
6 6
 use Flynt\Utils\Oembed;
7 7
 
8
-add_filter('Flynt/addComponentData?name=BlockVideoOembed', function ($data) {
9
-    add_action('wp_enqueue_scripts', function () {
8
+add_filter('Flynt/addComponentData?name=BlockVideoOembed', function($data) {
9
+    add_action('wp_enqueue_scripts', function() {
10 10
         Component::enqueueAssets('BlockVideoOembed', [
11 11
             [
12 12
                 'name' => 'lazysizes',
Please login to merge, or discard this patch.
Components/BlockImage/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=BlockImage', function ($data) {
8
-    add_action('wp_enqueue_scripts', function () {
7
+add_filter('Flynt/addComponentData?name=BlockImage', function($data) {
8
+    add_action('wp_enqueue_scripts', function() {
9 9
         Component::enqueueAssets('BlockImage', [
10 10
             [
11 11
                 'name' => 'lazysizes',
Please login to merge, or discard this patch.
Features/TimberLoader/functions.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
Features/ComponentLogServer/functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 
7 7
 define(__NAMESPACE__ . '\NS', __NAMESPACE__ . '\\');
8 8
 
9
-add_action('Flynt/afterRegisterFeatures', function () {
9
+add_action('Flynt/afterRegisterFeatures', function() {
10 10
     $componentManager = Flynt\ComponentManager::getInstance();
11 11
     $componentWhitelist = [];
12 12
     if (isset($_GET['component']) && !empty($_GET['component'])) {
@@ -43,21 +43,21 @@  discard block
 block discarded – undo
43 43
 {
44 44
     $type = gettype($data);
45 45
     $output = json_encode($data);
46
-    $result =  "<script>console.log({$output});</script>\n";
46
+    $result = "<script>console.log({$output});</script>\n";
47 47
     echoDebug($result, $postpone);
48 48
 }
49 49
 
50 50
 function consoleTable($data, $postpone = true)
51 51
 {
52 52
     $output = json_encode($data);
53
-    $result =  "<script>console.table({$output});</script>\n";
53
+    $result = "<script>console.table({$output});</script>\n";
54 54
     echoDebug($result, $postpone);
55 55
 }
56 56
 
57 57
 function echoDebug($data, $postpone)
58 58
 {
59 59
     if ($postpone) {
60
-        add_action('wp_footer', function () use ($data) {
60
+        add_action('wp_footer', function() use ($data) {
61 61
             echo $data;
62 62
         }, 30);
63 63
     } else {
Please login to merge, or discard this patch.