@@ -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 | } |
@@ -116,7 +116,8 @@ |
||
| 116 | 116 | $integration->pluginName |
| 117 | 117 | )); |
| 118 | 118 | return false; |
| 119 | - } elseif (!$integration->isSupported()) { |
|
| 119 | + } |
|
| 120 | + elseif (!$integration->isSupported()) { |
|
| 120 | 121 | glsr(Notice::class)->addError(sprintf( |
| 121 | 122 | __('Please update the %s plugin to v%s or greater to enable integration.', 'site-reviews'), |
| 122 | 123 | $integration->pluginName, |
@@ -2,74 +2,3 @@ |
||
| 2 | 2 | |
| 3 | 3 | return [ |
| 4 | 4 | <<<<<<< HEAD |
| 5 | - 'rating' => [ |
|
| 6 | - 'label' => __( 'Rate Your Expirence', 'site-reviews' ), |
|
| 7 | - 'type' => 'rating', |
|
| 8 | - ], |
|
| 9 | - 'FirstName' => [ |
|
| 10 | - 'label' => __( 'First Name', 'site-reviews' ), |
|
| 11 | - 'placeholder' => __( '', 'site-reviews' ), |
|
| 12 | - 'type' => 'text', |
|
| 13 | - 'required' => true, |
|
| 14 | - ], |
|
| 15 | - 'LastName' => [ |
|
| 16 | - 'label' => __( 'Last Name', 'site-reviews' ), |
|
| 17 | - 'placeholder' => __( '', 'site-reviews' ), |
|
| 18 | - 'type' => 'text', |
|
| 19 | - 'required' => true, |
|
| 20 | - ], |
|
| 21 | - 'email' => [ |
|
| 22 | - 'label' => __( 'Email', 'site-reviews' ), |
|
| 23 | - 'placeholder' => __( '', 'site-reviews' ), |
|
| 24 | - 'type' => 'email', |
|
| 25 | - 'class' => 'vin-email' |
|
| 26 | - ], |
|
| 27 | - 'product' => [ |
|
| 28 | - 'label' => __( 'Select Product', 'site-reviews' ), |
|
| 29 | - 'placeholder' => __( 'Select Product', 'site-reviews' ), |
|
| 30 | - 'type' => 'text', |
|
| 31 | - ], |
|
| 32 | - 'title' => [ |
|
| 33 | - 'label' => __( 'Title', 'site-reviews' ), |
|
| 34 | - 'placeholder' => __( 'Your overall impression', 'site-reviews' ), |
|
| 35 | - 'type' => 'text', |
|
| 36 | - ], |
|
| 37 | - 'content' => [ |
|
| 38 | - 'label' => __( 'Review', 'site-reviews' ), |
|
| 39 | - 'placeholder' => __( 'We would love to hear about your expirence, level of satisfaction, complaints, comments and feedback here!', 'site-reviews' ), |
|
| 40 | - 'rows' => 5, |
|
| 41 | - 'type' => 'textarea', |
|
| 42 | - ], |
|
| 43 | - 'terms' => [ |
|
| 44 | -======= |
|
| 45 | - 'rating' => [ |
|
| 46 | - 'label' => __('Your overall rating', 'site-reviews'), |
|
| 47 | - 'type' => 'rating', |
|
| 48 | - ], |
|
| 49 | - 'title' => [ |
|
| 50 | - 'label' => __('Title of your review', 'site-reviews'), |
|
| 51 | - 'placeholder' => __('Summarize your review or highlight an interesting detail', 'site-reviews'), |
|
| 52 | - 'type' => 'text', |
|
| 53 | - ], |
|
| 54 | - 'content' => [ |
|
| 55 | - 'label' => __('Your review', 'site-reviews'), |
|
| 56 | - 'placeholder' => __('Tell people your review', 'site-reviews'), |
|
| 57 | - 'rows' => 5, |
|
| 58 | - 'type' => 'textarea', |
|
| 59 | - ], |
|
| 60 | - 'name' => [ |
|
| 61 | - 'label' => __('Your name', 'site-reviews'), |
|
| 62 | - 'placeholder' => __('Tell us your name', 'site-reviews'), |
|
| 63 | - 'type' => 'text', |
|
| 64 | - ], |
|
| 65 | - 'email' => [ |
|
| 66 | - 'label' => __('Your email', 'site-reviews'), |
|
| 67 | - 'placeholder' => __('Tell us your email', 'site-reviews'), |
|
| 68 | - 'type' => 'email', |
|
| 69 | - ], |
|
| 70 | - 'terms' => [ |
|
| 71 | ->>>>>>> 7c993b837bc3f75f3a012473d113227e5bc8f116 |
|
| 72 | - 'label' => __('This review is based on my own experience and is my genuine opinion.', 'site-reviews'), |
|
| 73 | - 'type' => 'checkbox', |
|
| 74 | - ], |
|
| 75 | -]; |
|