Passed
Pull Request — master (#155)
by Doğa
04:12
created
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.
Components/ListComponents/functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@  discard block
 block discarded – undo
7 7
 use Flynt\Utils\Options;
8 8
 use Flynt\Utils\Asset;
9 9
 
10
-add_filter('Flynt/addComponentData?name=ListComponents', function ($data) {
10
+add_filter('Flynt/addComponentData?name=ListComponents', function($data) {
11 11
     if (!empty($data['componentBlocks'])) {
12
-        $data['componentBlocks'] = array_map(function ($block) {
12
+        $data['componentBlocks'] = array_map(function($block) {
13 13
             $block['component'] = substr($block['component'], strpos($block['component'], '/Components/'));
14 14
 
15 15
             if (file_exists(Asset::requirePath($block['component'] . 'screenshot.png'))) {
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     return $data;
36 36
 });
37 37
 
38
-add_filter('acf/load_field/name=component', function ($field) {
38
+add_filter('acf/load_field/name=component', function($field) {
39 39
     $componentManager = ComponentManager::getInstance();
40 40
     $field['choices'] = array_flip($componentManager->getAll());
41 41
     return $field;
Please login to merge, or discard this patch.
lib/Utils/Options.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             }
103 103
         }
104 104
 
105
-        add_action('current_screen', function ($currentScreen) {
105
+        add_action('current_screen', function($currentScreen) {
106 106
             $currentScreenId = strtolower($currentScreen->id);
107 107
             foreach (static::OPTION_TYPES as $optionType => $option) {
108 108
                 $isTranslatable = $option['translatable'];
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                     );
132 132
 
133 133
                     // hide language selector in admin bar
134
-                    add_action('wp_before_admin_bar_render', function () {
134
+                    add_action('wp_before_admin_bar_render', function() {
135 135
                         $adminBar = $GLOBALS['wp_admin_bar'];
136 136
                         $adminBar->remove_menu('WPML_ALS');
137 137
                     });
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                 ] ?? [])[$groupName] ?? [];
194 194
             return array_combine(
195 195
                 $optionNames,
196
-                array_map(function ($optionName) use (
196
+                array_map(function($optionName) use (
197 197
                     $prefix,
198 198
                     $isTranslatable
199 199
                 ) {
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 
304 304
     protected static function prefixFields($fields, $prefix)
305 305
     {
306
-        return array_map(function ($field) use ($prefix) {
306
+        return array_map(function($field) use ($prefix) {
307 307
             $field['name'] = $prefix . '_' . $field['name'];
308 308
             return $field;
309 309
         }, $fields);
Please login to merge, or discard this patch.