Passed
Push — master ( 04b043...334ee0 )
by Paul
04:11
created
plugin/Database.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,8 @@
 block discarded – undo
116 116
         ];
117 117
         if (is_numeric($searchTerm)) {
118 118
             $args['post__in'] = [$searchTerm];
119
-        } else {
119
+        }
120
+        else {
120 121
             $args['orderby'] = 'relevance';
121 122
             $args['posts_per_page'] = 10;
122 123
             $args['s'] = $searchTerm;
Please login to merge, or discard this patch.
helpers.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,8 @@
 block discarded – undo
100 100
     if (1 == count($vars)) {
101 101
         $value = htmlspecialchars(print_r($vars[0], true), ENT_QUOTES, 'UTF-8');
102 102
         printf('<div class="glsr-debug"><pre>%s</pre></div>', $value);
103
-    } else {
103
+    }
104
+    else {
104 105
         echo '<div class="glsr-debug-group">';
105 106
         foreach ($vars as $var) {
106 107
             glsr_debug($var);
Please login to merge, or discard this patch.
plugin/Handlers/TogglePinned.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,8 @@
 block discarded – undo
19 19
         if (is_null($command->pinned)) {
20 20
             $meta = glsr(Database::class)->get($command->id, 'pinned');
21 21
             $command->pinned = !wp_validate_boolean($meta);
22
-        } else {
22
+        }
23
+        else {
23 24
             $notice = $command->pinned
24 25
                 ? __('Review pinned.', 'site-reviews')
25 26
                 : __('Review unpinned.', 'site-reviews');
Please login to merge, or discard this patch.
plugin/Modules/Html/Partials/SiteReviews.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -194,7 +194,8 @@
 block discarded – undo
194 194
         $dateFormat = $this->getOption('settings.reviews.date.format', 'default');
195 195
         if ('relative' == $dateFormat) {
196 196
             $date = glsr(Date::class)->relative($value);
197
-        } else {
197
+        }
198
+        else {
198 199
             $format = 'custom' == $dateFormat
199 200
                 ? $this->getOption('settings.reviews.date.custom', 'M j, Y')
200 201
                 : glsr(OptionManager::class)->getWP('date_format', 'F j, Y');
Please login to merge, or discard this patch.
plugin/Helpers/Arr.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,8 @@
 block discarded – undo
64 64
                 if ($flattenValue) {
65 65
                     $value = '['.implode(', ', $value).']';
66 66
                 }
67
-            } elseif (is_array($value)) {
67
+            }
68
+            elseif (is_array($value)) {
68 69
                 $result = array_merge($result, static::flattenArray($value, $flattenValue, $newKey));
69 70
                 continue;
70 71
             }
Please login to merge, or discard this patch.
plugin/Modules/Email.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,8 @@
 block discarded – undo
134 134
                 ['context' => $this->email['template-tags']], 
135 135
                 $this->email['template']
136 136
             );
137
-        } elseif ($this->email['template']) {
137
+        }
138
+        elseif ($this->email['template']) {
138 139
             $message = glsr(Template::class)->build('templates/'.$this->email['template'], [
139 140
                 'context' => $this->email['template-tags'],
140 141
             ]);
Please login to merge, or discard this patch.
plugin/Modules/Translation.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,8 @@  discard block
 block discarded – undo
74 74
             foreach ($potEntries as $key => $entry) {
75 75
                 $entries[html_entity_decode($key, ENT_COMPAT, 'UTF-8')] = $entry;
76 76
             }
77
-        } catch (Exception $e) {
77
+        }
78
+        catch (Exception $e) {
78 79
             glsr_log()->error($e->getMessage());
79 80
         }
80 81
         return $entries;
@@ -197,7 +198,8 @@  discard block
 block discarded – undo
197 198
                 if (in_array($needle, [$single, $plural])) {
198 199
                     $this->results[$key] = $entry;
199 200
                 }
200
-            } elseif (Str::contains(sprintf('%s %s', $single, $plural), $needle)) {
201
+            }
202
+            elseif (Str::contains(sprintf('%s %s', $single, $plural), $needle)) {
201 203
                 $this->results[$key] = $entry;
202 204
             }
203 205
         }
@@ -243,7 +245,8 @@  discard block
 block discarded – undo
243 245
             foreach ($keys as $key) {
244 246
                 try {
245 247
                     $entry = $this->normalizeEntryString($entry, $key);
246
-                } catch (\TypeError $error) {
248
+                }
249
+                catch (\TypeError $error) {
247 250
                     glsr_log()->once('error', 'Translation/normalize', $error);
248 251
                     glsr_log()->once('debug', 'Translation/normalize', $entry);
249 252
                 }
Please login to merge, or discard this patch.
activate.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,8 @@
 block discarded – undo
125 125
                 sprintf($messages['wrong_version'], $messages['php_version'].' '.$this->versions['php']),
126 126
                 sprintf($messages['update_php'], PHP_VERSION).'</p><p>'.$rollbackMessage
127 127
             );
128
-        } elseif (!$this->isWpValid()) {
128
+        }
129
+        elseif (!$this->isWpValid()) {
129 130
             printf($noticeTemplate,
130 131
                 sprintf($messages['notice'], $pluginName),
131 132
                 sprintf($messages['wrong_version'], $messages['wp_version'].' '.$this->versions['wordpress']),
Please login to merge, or discard this patch.
plugin/Controllers/SettingsController.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -134,7 +134,8 @@  discard block
 block discarded – undo
134 134
                 $integration->pluginName
135 135
             ));
136 136
             return false;
137
-        } elseif (!$integration->isSupported()) {
137
+        }
138
+        elseif (!$integration->isSupported()) {
138 139
             glsr(Notice::class)->addError(sprintf(
139 140
                 __('Please update the %s plugin to v%s or greater to enable integration.', 'site-reviews'),
140 141
                 $integration->pluginName,
@@ -161,7 +162,8 @@  discard block
 block discarded – undo
161 162
             if (!$updater->isLicenseValid()) {
162 163
                 throw new Exception('Invalid license: '.$license.' ('.$addon->id.')');
163 164
             }
164
-        } catch (Exception $e) {
165
+        }
166
+        catch (Exception $e) {
165 167
             $license = '';
166 168
             glsr_log()->debug($e->getMessage());
167 169
             glsr(Notice::class)->addError(__('A license you entered was invalid.', 'site-reviews'));
Please login to merge, or discard this patch.