Passed
Push — master ( ccb079...7906b4 )
by Paul
04:39
created
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/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.
plugin/Application.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,8 @@
 block discarded – undo
207 207
                 $this->bind($id, $addon);
208 208
                 $addon->init();
209 209
             }
210
-        } catch(\ReflectionException $e) {
210
+        }
211
+        catch(\ReflectionException $e) {
211 212
             glsr_log()->error('Attempted to register an invalid addon.');
212 213
         }
213 214
     }
Please login to merge, or discard this patch.
plugin/Controllers/ReviewController.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
         $review = glsr_get_review($post);
65 65
         if ('publish' == $post->post_status) {
66 66
             glsr(CountsManager::class)->increaseAll($review);
67
-        } else {
67
+        }
68
+        else {
68 69
             glsr(CountsManager::class)->decreaseAll($review);
69 70
         }
70 71
     }
Please login to merge, or discard this patch.
views/partials/addons/addon.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,8 +15,11 @@  discard block
 block discarded – undo
15 15
             <span class="glsr-addon-link button button-secondary" disabled>
16 16
                 <?= __('Installed', 'site-reviews'); ?>
17 17
             </span>
18
-            <?php else: ?>
19
-            <a href="<?= wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin='.$plugin), 'activate-plugin_'.$plugin); ?>" class="glsr-addon-link button button-secondary">
18
+            <?php else {
19
+	: ?>
20
+            <a href="<?= wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin='.$plugin), 'activate-plugin_'.$plugin);
21
+}
22
+?>" class="glsr-addon-link button button-secondary">
20 23
                 <?= __('Activate', 'site-reviews'); ?>
21 24
             </a>
22 25
             <?php endif; ?>
@@ -24,9 +27,12 @@  discard block
 block discarded – undo
24 27
             <a href="mailto:[email protected]?subject=I%20would%20like%20to%20become%20a%20beta%20tester%20({{ slug }})" class="glsr-addon-link glsr-external button button-secondary">
25 28
                 <?= __('Try the beta', 'site-reviews'); ?>
26 29
             </a>
27
-        <?php else: ?>
30
+        <?php else {
31
+	: ?>
28 32
             <a href="{{ link }}" class="glsr-addon-link glsr-external button button-secondary">
29
-                <?= __('More Info', 'site-reviews'); ?>
33
+                <?= __('More Info', 'site-reviews');
34
+}
35
+?>
30 36
             </a>
31 37
         <?php endif; ?>
32 38
         </div>
Please login to merge, or discard this patch.