@@ -40,7 +40,8 @@ |
||
| 40 | 40 | protected $translator; |
| 41 | 41 | protected $welcome; |
| 42 | 42 | |
| 43 | - public function __construct(Application $app ) { |
|
| 43 | + public function __construct(Application $app ) |
|
| 44 | + { |
|
| 44 | 45 | $this->app = $app; |
| 45 | 46 | $this->admin = $app->make(AdminController::class); |
| 46 | 47 | $this->blocks = $app->make(BlocksController::class); |
@@ -74,7 +74,8 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -125,7 +125,8 @@ |
||
| 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']), |
@@ -134,7 +134,8 @@ discard block |
||
| 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 |
||
| 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')); |
@@ -207,7 +207,8 @@ |
||
| 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 | } |
@@ -139,7 +139,8 @@ discard block |
||
| 139 | 139 | foreach (glsr()->addons as $addon) { |
| 140 | 140 | try { |
| 141 | 141 | glsr($addon)->updater->getPluginUpdate(true); |
| 142 | - } catch (\Exception $e) { |
|
| 142 | + } |
|
| 143 | + catch (\Exception $e) { |
|
| 143 | 144 | glsr_log()->error($e->getMessage()); |
| 144 | 145 | } |
| 145 | 146 | } |
@@ -198,7 +199,8 @@ discard block |
||
| 198 | 199 | unset($transient->no_update[$this->plugin]); |
| 199 | 200 | $updateInfo->update = true; |
| 200 | 201 | $transient->response[$this->plugin] = $updateInfo; |
| 201 | - } else { |
|
| 202 | + } |
|
| 203 | + else { |
|
| 202 | 204 | unset($transient->response[$this->plugin]); |
| 203 | 205 | $transient->no_update[$this->plugin] = $updateInfo; |
| 204 | 206 | } |
@@ -64,7 +64,8 @@ |
||
| 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 | } |