Passed
Push — master ( 12f9b6...cf71c4 )
by Austin
02:59
created
admin/class-wordpress-security-txt-sanitizer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
         } elseif (in_array($this->type, ['hidden', 'month', 'text'], true)) {
86 86
             $sanitized = $this->sanitize_wrapper($this->data, 'sanitize_text_field');
87 87
         } elseif ($this->type == 'checkbox') {
88
-            $sanitized = (isset($this->data) && ! is_null($this->data) ? true : false);
88
+            $sanitized = (isset($this->data) && !is_null($this->data) ? true : false);
89 89
         } elseif ($this->type == 'editor') {
90 90
             $sanitized = wp_kses_post($this->data);
91 91
         } elseif ($this->type == 'email') {
Please login to merge, or discard this patch.
admin/partials/wordpress-security-txt-field-text.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  * @subpackage WordPress_Security_Txt/admin/partials
11 11
  */
12 12
 
13
-if (! empty($atts['label'])) {
13
+if (!empty($atts['label'])) {
14 14
     ?><label for="<?php echo esc_attr($atts['id']); ?>"><?php esc_html_e($atts['label'], 'wordpress-security-txt'); ?>
15 15
     : </label><?php
16 16
 }
@@ -23,6 +23,6 @@  discard block
 block discarded – undo
23 23
     type="<?php echo esc_attr($atts['type']); ?>"
24 24
     value="<?php echo esc_attr($atts['value']); ?>" /><?php
25 25
 
26
-if (! empty($atts['description'])) {
26
+if (!empty($atts['description'])) {
27 27
     ?><span class="description"><?php esc_html_e($atts['description'], 'wordpress-security-txt'); ?></span><?php
28 28
 }
Please login to merge, or discard this patch.
admin/partials/wordpress-security-txt-section-debug.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,10 +137,10 @@
 block discarded – undo
137 137
                 <li><strong>File Size</strong>:
138 138
                     <code><?php echo filesize(WordPress_Security_Txt_Public::cache_file()); ?> bytes</code></li>
139 139
                 <li><strong>Creation Time</strong>: <code><?php echo date('c',
140
-                                                                           filectime(WordPress_Security_Txt_Public::cache_file())); ?></code>
140
+                                                                            filectime(WordPress_Security_Txt_Public::cache_file())); ?></code>
141 141
                 </li>
142 142
                 <li><strong>Modification Time</strong>: <code><?php echo date('c',
143
-                                                                               filemtime(WordPress_Security_Txt_Public::cache_file())); ?></code>
143
+                                                                                filemtime(WordPress_Security_Txt_Public::cache_file())); ?></code>
144 144
                 </li>
145 145
 			<?php
146 146
             } ?>
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     <ul id="wordpress-security-txt-sections[debug][database]">
26 26
 		<?php
27 27
         foreach (WordPress_Security_Txt_Admin::get_options($this->plugin_name) as $key => $value) {
28
-            if (! is_null($value)) {
28
+            if (!is_null($value)) {
29 29
                 switch (gettype($value)) {
30 30
                     case 'boolean':
31 31
                         $value = $value ? 'true' : 'false';
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
             if (is_array($value)) {
37 37
                 ?>
38
-                <li><strong><?php echo $key; ?></strong>: <?php if (! is_null($value)) {
38
+                <li><strong><?php echo $key; ?></strong>: <?php if (!is_null($value)) {
39 39
                     ?>
40 40
                         <code>[count: <?php echo count($value); ?>]</code> <?php
41 41
                 } ?>
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
                         foreach ($value as $sub_key => $sub_value) {
46 46
                             if (is_array($sub_value)) {
47 47
                                 ?>
48
-                                <li><strong><?php echo $sub_key; ?></strong>: <?php if (! is_null($sub_value)) {
48
+                                <li><strong><?php echo $sub_key; ?></strong>: <?php if (!is_null($sub_value)) {
49 49
                                     ?>
50 50
                                         <code>[count: <?php echo count($sub_value); ?>]</code> <?php
51 51
                                 } ?>
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                                         if (is_array($sub_sub_value)) {
58 58
                                             ?>
59 59
                                             <li>
60
-                                                <strong><?php echo $sub_sub_key; ?></strong>: <?php if (! is_null($sub_sub_value)) {
60
+                                                <strong><?php echo $sub_sub_key; ?></strong>: <?php if (!is_null($sub_sub_value)) {
61 61
                                                 ?>
62 62
                                                     <code>[count: <?php echo count($sub_sub_value); ?>
63 63
                                                         ]</code> <?php
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                                         } else {
76 76
                                             ?>
77 77
                                             <li>
78
-                                                <strong><?php echo $sub_sub_key; ?></strong>: <?php if (! is_null($sub_sub_value)) {
78
+                                                <strong><?php echo $sub_sub_key; ?></strong>: <?php if (!is_null($sub_sub_value)) {
79 79
                                                 ?>
80 80
                                                     <code><?php echo $sub_sub_value; ?></code> <?php
81 81
                                             } ?>
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 								<?php
89 89
                             } else {
90 90
                                 ?>
91
-                                <li><strong><?php echo $key; ?></strong>: <?php if (! is_null($value)) {
91
+                                <li><strong><?php echo $key; ?></strong>: <?php if (!is_null($value)) {
92 92
                                     ?>
93 93
                                         <code><?php echo $value; ?></code> <?php
94 94
                                 } ?>
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 				<?php
103 103
             } else {
104 104
                 ?>
105
-                <li><strong><?php echo $key; ?></strong>: <?php if (! is_null($value)) {
105
+                <li><strong><?php echo $key; ?></strong>: <?php if (!is_null($value)) {
106 106
                     ?>
107 107
                         <code><?php echo strlen($value) > 255 ? substr($value, 0, 36) : $value; ?></code><?php echo strlen($value) > 255 ? '...' : ''; ?> <?php
108 108
                 } ?>(<em><?php echo gettype($value); ?></em>)
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     <p>Details for plugin cache on the WordPress filesystem <code><?php echo get_temp_dir(); ?></code> for <code>wordpress-security-txt</code>:
118 118
     </p>
119 119
     <ul id="wordpress-security-txt-sections[debug][cache]">
120
-        <li><strong>Enabled</strong>: <?php if (! is_null($this->options['cache'])) {
120
+        <li><strong>Enabled</strong>: <?php if (!is_null($this->options['cache'])) {
121 121
             ?>
122 122
                 <code><?php echo $this->options['cache'] ? 'true' : 'false'; ?></code> <?php
123 123
         } ?>
Please login to merge, or discard this patch.
admin/partials/wordpress-security-txt-field-select.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  * @subpackage WordPress_Security_Txt/admin/partials
11 11
  */
12 12
 
13
-if (! empty($atts['label'])) {
13
+if (!empty($atts['label'])) {
14 14
     ?>
15 15
     <label for="<?php echo esc_attr($atts['id']); ?>">
16 16
         <?php esc_html_e($atts['label'], 'employees'); ?>:
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         name="<?php echo esc_attr($atts['name']); ?>">
27 27
     <?php
28 28
 
29
-    if (! empty($atts['blank'])) {
29
+    if (!empty($atts['blank'])) {
30 30
         ?>
31 31
         <option value><?php esc_html_e($atts['blank'], $this->plugin_name); ?></option>
32 32
         <?php
Please login to merge, or discard this patch.
admin/partials/wordpress-security-txt-field-editor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  * @subpackage WordPress_Security_Txt/admin/partials
11 11
  */
12 12
 
13
-if (! empty($atts['label'])) {
13
+if (!empty($atts['label'])) {
14 14
     ?><label for="<?php
15 15
 
16 16
     echo esc_attr($atts['id']); ?>"><?php
Please login to merge, or discard this patch.
admin/partials/wordpress-security-txt-field-repeater.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
             $setatts['class'] .= ' hidden';
25 25
         }
26 26
 
27
-        if (! empty($repeater[$i][$setatts['title-field']])) {
27
+        if (!empty($repeater[$i][$setatts['title-field']])) {
28 28
             $setatts['label-header'] = $repeater[$i][$setatts['title-field']];
29 29
         } ?>
30 30
         <li class="<?php echo esc_attr($setatts['class']); ?>">
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
                     foreach ($setatts['fields'] as $fieldcount => $field) {
43 43
                         foreach ($field as $type => $atts) {
44
-                            if (! empty($repeater) && ! empty($repeater[$i][$atts['id']])) {
44
+                            if (!empty($repeater) && !empty($repeater[$i][$atts['id']])) {
45 45
                                 $atts['value'] = $repeater[$i][$atts['id']];
46 46
                             }
47 47
 
Please login to merge, or discard this patch.
admin/partials/wordpress-security-txt-field-textarea.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  * @subpackage WordPress_Security_Txt/admin/partials
11 11
  */
12 12
 
13
-if (! empty($atts['label'])) {
13
+if (!empty($atts['label'])) {
14 14
     ?><label for="<?php echo esc_attr($atts['id']); ?>"><?php esc_html_e($atts['label'], 'wordpress-security-txt'); ?>
15 15
     : </label><?php
16 16
 }
Please login to merge, or discard this patch.
admin/class-wordpress-security-txt-builder.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         $atts = wp_parse_args($args, $defaults);
86 86
 
87
-        if (! empty($this->options[$atts['id']])) {
87
+        if (!empty($this->options[$atts['id']])) {
88 88
             $atts['value'] = $this->options[$atts['id']];
89 89
         }
90 90
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
         $atts = wp_parse_args($args, $defaults);
111 111
 
112
-        if (! empty($this->options[$atts['id']])) {
112
+        if (!empty($this->options[$atts['id']])) {
113 113
             $atts['value'] = $this->options[$atts['id']];
114 114
         }
115 115
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
         $atts = wp_parse_args($args, $defaults);
135 135
 
136
-        if (! empty($this->options[$atts['id']])) {
136
+        if (!empty($this->options[$atts['id']])) {
137 137
             $atts['value'] = $this->options[$atts['id']];
138 138
         }
139 139
 
@@ -156,11 +156,11 @@  discard block
 block discarded – undo
156 156
         $count    = 1;
157 157
         $repeater = [];
158 158
 
159
-        if (! empty($this->options[$setatts['id']])) {
159
+        if (!empty($this->options[$setatts['id']])) {
160 160
             $repeater = maybe_unserialize($this->options[$setatts['id']][0]);
161 161
         }
162 162
 
163
-        if (! empty($repeater)) {
163
+        if (!empty($repeater)) {
164 164
             $count = count($repeater);
165 165
         }
166 166
 
@@ -187,13 +187,13 @@  discard block
 block discarded – undo
187 187
 
188 188
         $atts = wp_parse_args($args, $defaults);
189 189
 
190
-        if (! empty($this->options[$atts['id']])) {
190
+        if (!empty($this->options[$atts['id']])) {
191 191
             $atts['value'] = $this->options[$atts['id']];
192 192
         }
193 193
 
194
-        if (empty($atts['aria']) && ! empty($atts['description'])) {
194
+        if (empty($atts['aria']) && !empty($atts['description'])) {
195 195
             $atts['aria'] = $atts['description'];
196
-        } elseif (empty($atts['aria']) && ! empty($atts['label'])) {
196
+        } elseif (empty($atts['aria']) && !empty($atts['label'])) {
197 197
             $atts['aria'] = $atts['label'];
198 198
         }
199 199
 
@@ -213,13 +213,13 @@  discard block
 block discarded – undo
213 213
         $defaults['class']       = 'text widefat';
214 214
         $defaults['name']        = $this->plugin_name . '-options[' . $args['id'] . ']';
215 215
         $defaults['type']        = 'text';
216
-        $defaults['value']       = isset($args['value']) && ! empty($args['value']) ? $args['value'] : '';
216
+        $defaults['value']       = isset($args['value']) && !empty($args['value']) ? $args['value'] : '';
217 217
 
218 218
         apply_filters($this->plugin_name . '-field-text-options-defaults', $defaults);
219 219
 
220 220
         $atts = wp_parse_args($args, $defaults);
221 221
 
222
-        if (! empty($this->options[$atts['id']])) {
222
+        if (!empty($this->options[$atts['id']])) {
223 223
             $atts['value'] = $this->options[$atts['id']];
224 224
         }
225 225
 
@@ -240,13 +240,13 @@  discard block
 block discarded – undo
240 240
         $defaults['cols']    = 50;
241 241
         $defaults['name']    = $this->plugin_name . '-options[' . $args['id'] . ']';
242 242
         $defaults['rows']    = 10;
243
-        $defaults['value']   = isset($args['value']) && ! empty($args['value']) ? $args['value'] : '';
243
+        $defaults['value']   = isset($args['value']) && !empty($args['value']) ? $args['value'] : '';
244 244
 
245 245
         apply_filters($this->plugin_name . '-field-textarea-options-defaults', $defaults);
246 246
 
247 247
         $atts = wp_parse_args($args, $defaults);
248 248
 
249
-        if (! empty($this->options[$atts['id']])) {
249
+        if (!empty($this->options[$atts['id']])) {
250 250
             $atts['value'] = $this->options[$atts['id']];
251 251
         }
252 252
 
Please login to merge, or discard this patch.
admin/class-wordpress-security-txt-admin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -261,7 +261,7 @@
 block discarded – undo
261 261
     public function register_settings()
262 262
     {
263 263
         register_setting(
264
-            $this->plugin_name,// . '-options',
264
+            $this->plugin_name, // . '-options',
265 265
             $this->plugin_name . '-options',
266 266
             [$this, 'validate_options']
267 267
         );
Please login to merge, or discard this patch.