Passed
Push — master ( cfe520...d03db2 )
by
unknown
04:47 queued 10s
created
Components/ListLogos/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Api;
6 6
 
7
-add_filter('Flynt/addComponentData?name=ListLogos', function ($data) {
7
+add_filter('Flynt/addComponentData?name=ListLogos', function($data) {
8 8
 
9 9
     if (!empty($data['items'])) {
10
-        $data['items'] = array_map(function ($item) {
10
+        $data['items'] = array_map(function($item) {
11 11
             if (isset($item['image']->post_mime_type) && $item['image']->post_mime_type === 'image/svg+xml') {
12 12
                 $path = get_attached_file($item['image']->ID);
13 13
                 $item['image']->svg = file_get_contents($path);
Please login to merge, or discard this patch.
Components/GridPostsArchive/functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 const POST_TYPE = 'post';
10 10
 const FILTER_BY_TAXONOMY = 'category';
11 11
 
12
-add_filter('Flynt/addComponentData?name=GridPostsArchive', function ($data) {
12
+add_filter('Flynt/addComponentData?name=GridPostsArchive', function($data) {
13 13
     $postType = POST_TYPE;
14 14
     $taxonomy = FILTER_BY_TAXONOMY;
15 15
     $terms = get_terms([
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     ]);
19 19
     $queriedObject = get_queried_object();
20 20
     if (count($terms) > 1) {
21
-        $data['terms'] = array_map(function ($term) use ($queriedObject) {
21
+        $data['terms'] = array_map(function($term) use ($queriedObject) {
22 22
             $timberTerm = new Term($term);
23 23
             if ($queriedObject) {
24 24
                 $timberTerm->isActive = $queriedObject->taxonomy === $term->taxonomy && $queriedObject->term_id === $term->term_id;
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $data['isHome'] = true;
38 38
         $data['title'] = $queriedObject->post_title ?? get_bloginfo('name');
39 39
     } else {
40
-        $data['title'] =  get_the_archive_title();
40
+        $data['title'] = get_the_archive_title();
41 41
         $data['description'] = get_the_archive_description();
42 42
     }
43 43
 
Please login to merge, or discard this patch.
Components/BlockCountUp/functions.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -385,12 +385,12 @@
 block discarded – undo
385 385
         'type' => 'text',
386 386
         'required' => 1,
387 387
         'default_value' => ','
388
-      ],
389
-      [
388
+        ],
389
+        [
390 390
         'label' => 'Thousands Separator',
391 391
         'name' => 'thousandsSeparator',
392 392
         'type' => 'text',
393 393
         'required' => 1,
394 394
         'default_value' => '.'
395
-      ]
395
+        ]
396 396
 ]);
Please login to merge, or discard this patch.
Components/GridPostsLatest/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@
 block discarded – undo
8 8
 
9 9
 const POST_TYPE = 'post';
10 10
 
11
-add_filter('Flynt/addComponentData?name=GridPostsLatest', function ($data) {
11
+add_filter('Flynt/addComponentData?name=GridPostsLatest', function($data) {
12 12
     $postType = POST_TYPE;
13 13
     $data['taxonomies'] = $data['taxonomies'] ?: [];
14 14
 
15 15
     $data['items'] = Timber::get_posts([
16 16
         'post_status' => 'publish',
17 17
         'post_type' => $postType,
18
-        'category' => join(',', array_map(function ($taxonomy) {
18
+        'category' => join(',', array_map(function($taxonomy) {
19 19
             return $taxonomy->term_id;
20 20
         }, $data['taxonomies'])),
21 21
         'posts_per_page' => $data['options']['postCount'],
Please login to merge, or discard this patch.
Components/BlockPostHeader/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\Options;
6 6
 
7
-add_filter('Flynt/addComponentData?name=BlockPostHeader', function ($data) {
7
+add_filter('Flynt/addComponentData?name=BlockPostHeader', function($data) {
8 8
 
9 9
     return $data;
10 10
 });
Please login to merge, or discard this patch.
inc/timberDynamicResize.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     return $wpdb->prefix . TABLE_NAME;
18 18
 }
19 19
 
20
-call_user_func(function () {
20
+call_user_func(function() {
21 21
     $optionName = TABLE_NAME . '_db_version';
22 22
 
23 23
     $installedVersion = get_option($optionName);
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
     }
41 41
 });
42 42
 
43
-add_action('timber/twig/filters', function ($twig) {
43
+add_action('timber/twig/filters', function($twig) {
44 44
     $twig->addFilter(
45
-        new Twig_SimpleFilter('resizeDynamic', function (
45
+        new Twig_SimpleFilter('resizeDynamic', function(
46 46
             $src,
47 47
             $w,
48 48
             $h = 0,
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     return $twig;
85 85
 });
86 86
 
87
-Routes::map(IMAGE_ROUTE, function () {
87
+Routes::map(IMAGE_ROUTE, function() {
88 88
     $src = str_replace(
89 89
         '/app/uploads/' . IMAGE_PATH_SEPARATOR . '/',
90 90
         '/app/uploads/',
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     if ($localDev) {
108 108
         $src = http_build_url($homeUrl, ['path' => $urlParts['path']]);
109 109
     }
110
-    $moveImageFunction = function ($location) {
110
+    $moveImageFunction = function($location) {
111 111
         return str_replace(
112 112
             '/app/uploads/',
113 113
             '/app/uploads/' . IMAGE_PATH_SEPARATOR . '/',
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
 
181 181
 add_filter('mod_rewrite_rules', 'Flynt\\TimberDynamicResize\\addRewriteRule');
182 182
 
183
-add_action('after_switch_theme', function () {
183
+add_action('after_switch_theme', function() {
184 184
     add_action('shutdown', 'flush_rewrite_rules');
185 185
 });
186 186
 
187
-add_action('switch_theme', function () {
187
+add_action('switch_theme', function() {
188 188
     remove_filter('mod_rewrite_rules', 'Flynt\\TimberDynamicResize\\addRewriteRule');
189 189
     flush_rewrite_rules();
190 190
 });
Please login to merge, or discard this patch.
Components/FormNewsletter/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 ]);
22 22
 
23 23
 
24
-add_action('Flynt/afterRegisterComponents', function () {
24
+add_action('Flynt/afterRegisterComponents', function() {
25 25
     Options::addTranslatable('FormNewsletter', [
26 26
         [
27 27
             'label' => '',
Please login to merge, or discard this patch.
Components/FormContactForm7/functions.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 add_filter('wpcf7_load_js', '__return_false');
8 8
 add_filter('wpcf7_load_css', '__return_false');
9 9
 
10
-add_filter('Flynt/addComponentData?name=FormContactForm7', function ($data) {
10
+add_filter('Flynt/addComponentData?name=FormContactForm7', function($data) {
11 11
     function_exists('wpcf7_enqueue_scripts') && enqueueWpcf7Scripts();
12 12
     function_exists('wpcf7_enqueue_styles') && wpcf7_enqueue_styles();
13 13
 
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 
53 53
 remove_action('wpcf7_init', 'wpcf7_add_form_tag_submit', 10, 0);
54 54
 
55
-add_action('wpcf7_init', function () {
56
-    wpcf7_add_form_tag('submit', function ($tag) {
55
+add_action('wpcf7_init', function() {
56
+    wpcf7_add_form_tag('submit', function($tag) {
57 57
         $class = wpcf7_form_controls_class($tag->type, 'button');
58 58
 
59 59
         $atts = [];
@@ -174,12 +174,12 @@  discard block
 block discarded – undo
174 174
     [submit "Submit"]
175 175
   </div>
176 176
 </div>
177
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Simple field</h4> '.htmlspecialchars('
177
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Simple field</h4> ' . htmlspecialchars('
178 178
 <div class="form-group">
179 179
     <label for="yourCompany">Company</label>
180 180
     [text* your-company id:yourCompany placeholder "bleech"]
181 181
 </div>
182
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Two columns row</h4> '.htmlspecialchars('
182
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Two columns row</h4> ' . htmlspecialchars('
183 183
 <div class="form-row-2">
184 184
     <div class="form-group">
185 185
         <label for="firstName">First Name</label>
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         [text* last-name id:lastName placeholder "Winchester"]
191 191
     </div>
192 192
 </div>
193
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Three columns row</h4> '.htmlspecialchars('
193
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Three columns row</h4> ' . htmlspecialchars('
194 194
 <div class="form-row-3">
195 195
     <div class="form-group">
196 196
         <label for="firstName">First Name</label>
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         [email* your-email id:yourEmail placeholder "[email protected]"]
206 206
     </div>
207 207
 </div>
208
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Two columns row (left column bigger than right)</h4> '.htmlspecialchars('
208
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Two columns row (left column bigger than right)</h4> ' . htmlspecialchars('
209 209
 <div class="form-row-2-lg-left">
210 210
     <div class="form-group">
211 211
         <label for="yourAddress">Address</label>
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         [number zipcode id:zipCode placeholder "10178"]
217 217
     </div>
218 218
 </div>
219
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Two columns row (right column bigger than left)</h4> '.htmlspecialchars('
219
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Two columns row (right column bigger than left)</h4> ' . htmlspecialchars('
220 220
 <div class="form-row-2-lg-right">
221 221
     <div class="form-group">
222 222
         <label for="phoneCode">Code</label>
@@ -227,49 +227,49 @@  discard block
 block discarded – undo
227 227
         [tel mobile-phone id:mobilePhone placeholder "767-3842"]
228 228
     </div>
229 229
 </div>
230
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Textarea</h4> '.htmlspecialchars('
230
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Textarea</h4> ' . htmlspecialchars('
231 231
 <div class="form-group">
232 232
     <label for="yourMessage">Your Message</label>
233 233
     [textarea your-message id:yourMessage placeholder "Message here"]
234 234
 </div>
235
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">URL field</h4> '.htmlspecialchars('
235
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">URL field</h4> ' . htmlspecialchars('
236 236
 <div class="form-group">
237 237
     <label for="yourWebsite">Website</label>
238 238
     [url website id:yourWebsite placeholder "http://"]
239 239
 </div>
240
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Date field</h4> '.htmlspecialchars('
240
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Date field</h4> ' . htmlspecialchars('
241 241
 <div class="form-group">
242 242
     <label for="yourDate">Date</label>
243 243
     [date date id:yourDate]
244 244
 </div>
245
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Checkbox</h4> '.htmlspecialchars('
245
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Checkbox</h4> ' . htmlspecialchars('
246 246
 <div class="form-group">
247 247
     [checkbox checkbox-555 use_label_element "some " "another" "else"]
248 248
 </div>
249
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Radio</h4> '.htmlspecialchars('
249
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Radio</h4> ' . htmlspecialchars('
250 250
 <div class="form-group">
251 251
     [radio radio-647 default:1 use_label_element "some " "else" "another"]
252 252
 </div>
253
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Acceptance</h4> '.htmlspecialchars('
253
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Acceptance</h4> ' . htmlspecialchars('
254 254
 <div class="form-group">
255 255
     [acceptance acceptance-782 use_label_element optional]
256 256
         By default, an acceptance checkbox is a different mechanism than
257 257
         general input validation, and it runs after all validation succeeds.
258 258
     [/acceptance]
259 259
 </div>
260
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Quiz field</h4> '.htmlspecialchars('
260
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Quiz field</h4> ' . htmlspecialchars('
261 261
 <div class="form-group label-wrap">
262 262
     [quiz quiz-413 "1+1=?|1" "1+2=?|3" "1+3=?|4"]
263 263
 </div>
264
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">File field</h4> '.htmlspecialchars('
264
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">File field</h4> ' . htmlspecialchars('
265 265
 <div class="form-group">
266 266
     [file file-838]
267 267
 </div>
268
-').' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Submit button</h4> '.htmlspecialchars('
268
+') . ' <h4 style="color: #ca4a1f;margin-bottom:0;font-size: 14px;">Submit button</h4> ' . htmlspecialchars('
269 269
 <div class="form-button">
270 270
     [submit "Send Message"]
271 271
 </div>
272
-').'
272
+') . '
273 273
 </pre>
274 274
                 ',
275 275
                 'new_lines' => 'wpautop',
Please login to merge, or discard this patch.
Components/FeatureAdminComponentScreenshots/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 use Flynt\ComponentManager;
5 5
 use Flynt\Utils\Asset;
6 6
 
7
-add_action('admin_enqueue_scripts', function () {
7
+add_action('admin_enqueue_scripts', function() {
8 8
     $data = [
9 9
         'templateDirectoryUri' => get_template_directory_uri() . '/dist',
10 10
     ];
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 if (class_exists('acf')) {
15 15
     if (is_admin()) {
16 16
         // add image to the flexible content component name
17
-        add_filter('acf/fields/flexible_content/layout_title', function ($title, $field, $layout, $i) {
17
+        add_filter('acf/fields/flexible_content/layout_title', function($title, $field, $layout, $i) {
18 18
             $componentManager = ComponentManager::getInstance();
19 19
             $componentName = ucfirst($layout['name']);
20 20
             $componentPathFull = $componentManager->getComponentDirPath($componentName);
Please login to merge, or discard this patch.