@@ -158,7 +158,8 @@ |
||
158 | 158 | $counts = []; |
159 | 159 | if ($this->isMixedCount($args)) { |
160 | 160 | $counts = [$this->buildCounts($args)]; // force query the database |
161 | - } else { |
|
161 | + } |
|
162 | + else { |
|
162 | 163 | foreach ($args['post_ids'] as $postId) { |
163 | 164 | $counts[] = $this->getPostCounts($postId); |
164 | 165 | } |
@@ -64,7 +64,8 @@ |
||
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 | } |
@@ -51,7 +51,8 @@ discard block |
||
51 | 51 | } |
52 | 52 | if ('F' === $rebusifyProductType && 'yes' === glsr_get_option('general.rebusify')) { |
53 | 53 | $button = $this->buildUpgradeButton(); |
54 | - } else { |
|
54 | + } |
|
55 | + else { |
|
55 | 56 | $button = $this->buildCreateButton(); |
56 | 57 | } |
57 | 58 | $context['field'].= $button; |
@@ -229,7 +230,8 @@ discard block |
||
229 | 230 | ); |
230 | 231 | if ($rebusify->success) { |
231 | 232 | update_option($this->rebusifyKey, Arr::get($rebusify->response, 'producttype')); |
232 | - } else { |
|
233 | + } |
|
234 | + else { |
|
233 | 235 | delete_option($this->rebusifyKey); |
234 | 236 | $settings = Arr::set($settings, $this->enabledKey, 'no'); |
235 | 237 | glsr(Notice::class)->addError(sprintf( |
@@ -134,7 +134,8 @@ |
||
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 | ]); |
@@ -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 | } |