@@ -36,7 +36,7 @@ |
||
36 | 36 | /** |
37 | 37 | * @inheritdoc |
38 | 38 | */ |
39 | - protected array|bool|int $allowAnonymous = [ |
|
39 | + protected array | bool | int $allowAnonymous = [ |
|
40 | 40 | 'all-meta-containers', |
41 | 41 | 'meta-title-container', |
42 | 42 | 'meta-tag-container', |
@@ -30,7 +30,7 @@ |
||
30 | 30 | /** |
31 | 31 | * @inheritdoc |
32 | 32 | */ |
33 | - protected array|bool|int $allowAnonymous = [ |
|
33 | + protected array | bool | int $allowAnonymous = [ |
|
34 | 34 | 'humans', |
35 | 35 | 'robots', |
36 | 36 | 'ads', |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | /** |
47 | 47 | * @var bool|array |
48 | 48 | */ |
49 | - protected array|bool|int $allowAnonymous = [ |
|
49 | + protected array | bool | int $allowAnonymous = [ |
|
50 | 50 | ]; |
51 | 51 | |
52 | 52 | // Public Methods |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | // Query the db table |
101 | 101 | $offset = ($page - 1) * $per_page; |
102 | 102 | $currentSiteHandle = ''; |
103 | - if ((int)$siteId !== 0) { |
|
103 | + if ((int) $siteId !== 0) { |
|
104 | 104 | $site = Craft::$app->getSites()->getSiteById($siteId); |
105 | 105 | if ($site !== null) { |
106 | 106 | $currentSiteHandle = $site->handle; |
@@ -155,11 +155,11 @@ discard block |
||
155 | 155 | $numGrades = \count(SettingsController::SETUP_GRADES); |
156 | 156 | $numFields = \count(SettingsController::SEO_SETUP_FIELDS); |
157 | 157 | foreach (SettingsController::SEO_SETUP_FIELDS as $setupField => $setupLabel) { |
158 | - $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]); |
|
158 | + $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]); |
|
159 | 159 | $value = $variables['contentSetupChecklist'][$setupField]['value'] ?? 0; |
160 | 160 | $variables['contentSetupChecklist'][$setupField] = [ |
161 | 161 | 'label' => $setupLabel, |
162 | - 'value' => $value + (int)!empty($metaBundle->metaGlobalVars[$setupField]), |
|
162 | + 'value' => $value + (int) !empty($metaBundle->metaGlobalVars[$setupField]), |
|
163 | 163 | ]; |
164 | 164 | } |
165 | 165 | $stat = round($numGrades - (($stat * $numGrades) / $numFields)); |
@@ -66,8 +66,8 @@ |
||
66 | 66 | string $sort = 'sourceName|asc', |
67 | 67 | int $page = 1, |
68 | 68 | int $per_page = 20, |
69 | - $filter = '', |
|
70 | - $siteId = 0 |
|
69 | + $filter = '', |
|
70 | + $siteId = 0 |
|
71 | 71 | ): Response |
72 | 72 | { |
73 | 73 | $data = []; |
@@ -30,7 +30,7 @@ |
||
30 | 30 | /** |
31 | 31 | * @inheritdoc |
32 | 32 | */ |
33 | - protected array|bool|int $allowAnonymous = [ |
|
33 | + protected array | bool | int $allowAnonymous = [ |
|
34 | 34 | 'get-type', |
35 | 35 | 'get-decomposed-type', |
36 | 36 | 'get-type-array', |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | /** |
33 | 33 | * @inheritdoc |
34 | 34 | */ |
35 | - protected array|bool|int $allowAnonymous = [ |
|
35 | + protected array | bool | int $allowAnonymous = [ |
|
36 | 36 | 'social-media', |
37 | 37 | ]; |
38 | 38 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $html = ''; |
54 | 54 | |
55 | 55 | // Don't allow the preview to be accessed publicly |
56 | - $this->requireAuthorization(Seomatic::SEOMATIC_PREVIEW_AUTHORIZATION_KEY . $elementId); |
|
56 | + $this->requireAuthorization(Seomatic::SEOMATIC_PREVIEW_AUTHORIZATION_KEY.$elementId); |
|
57 | 57 | |
58 | 58 | /** @var Element $element */ |
59 | 59 | $element = Craft::$app->getElements()->getElementById($elementId, null, $siteId); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | /** |
35 | 35 | * @inheritdoc |
36 | 36 | */ |
37 | - protected array|bool|int $allowAnonymous = [ |
|
37 | + protected array | bool | int $allowAnonymous = [ |
|
38 | 38 | 'seo-file-link', |
39 | 39 | ]; |
40 | 40 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } |
84 | 84 | // Add the Link header |
85 | 85 | if (!empty($canonical)) { |
86 | - $headerValue = '<' . $canonical . '>; rel="canonical"'; |
|
86 | + $headerValue = '<'.$canonical.'>; rel="canonical"'; |
|
87 | 87 | $response->headers->add('Link', $headerValue); |
88 | 88 | } |
89 | 89 | // Ensure the file type is allowed |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | Event::on( |
106 | 106 | ProductTypes::class, |
107 | 107 | ProductTypes::EVENT_AFTER_SAVE_PRODUCTTYPE, |
108 | - function (ProductTypeEvent $event) { |
|
108 | + function(ProductTypeEvent $event) { |
|
109 | 109 | Craft::debug( |
110 | 110 | 'ProductTypes::EVENT_AFTER_SAVE_PRODUCTTYPE', |
111 | 111 | __METHOD__ |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | ProductTypes::class, |
122 | 122 | ProductTypes::EVENT_AFTER_SAVE_PRODUCTTYPE, |
123 | 123 | /** @var ProductTypeEvent $event */ |
124 | - static function ($event) { |
|
124 | + static function($event) { |
|
125 | 125 | Craft::debug( |
126 | 126 | 'ProductTypes::EVENT_AFTER_SAVE_PRODUCTTYPE', |
127 | 127 | __METHOD__ |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | Event::on( |
178 | 178 | Product::class, |
179 | 179 | Product::EVENT_DEFINE_SIDEBAR_HTML, |
180 | - static function (DefineHtmlEvent $event) { |
|
180 | + static function(DefineHtmlEvent $event) { |
|
181 | 181 | Craft::debug( |
182 | 182 | 'Product::EVENT_DEFINE_SIDEBAR_HTML', |
183 | 183 | __METHOD__ |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | ConfigHelper::getConfigFromFile(self::configFilePath()), |
387 | 387 | [ |
388 | 388 | 'sourceId' => $sourceModel->id, |
389 | - 'sourceName' => (string)$sourceModel->name, |
|
389 | + 'sourceName' => (string) $sourceModel->name, |
|
390 | 390 | 'sourceHandle' => $sourceModel->handle, |
391 | 391 | ] |
392 | 392 | ); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * @var bool|array |
51 | 51 | */ |
52 | - protected array|bool|int $allowAnonymous = [ |
|
52 | + protected array | bool | int $allowAnonymous = [ |
|
53 | 53 | ]; |
54 | 54 | |
55 | 55 | // Public Methods |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function actionGenerate() |
76 | 76 | { |
77 | - echo 'Generating sitemap' . PHP_EOL; |
|
77 | + echo 'Generating sitemap'.PHP_EOL; |
|
78 | 78 | if ($this->siteId !== null) { |
79 | 79 | $siteIds[] = $this->siteId; |
80 | 80 | } else { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | ]); |
117 | 117 | } |
118 | 118 | |
119 | - echo '---' . PHP_EOL; |
|
119 | + echo '---'.PHP_EOL; |
|
120 | 120 | } |
121 | 121 | } |
122 | 122 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | // Add a URL to the schema.org type if this is a MetaJsonLD object |
159 | 159 | if ($isMetaJsonLdModel) { |
160 | 160 | /** @var $this MetaJsonLd */ |
161 | - $extraInfo = ' for http://schema.org/' . $this->type; |
|
161 | + $extraInfo = ' for http://schema.org/'.$this->type; |
|
162 | 162 | } |
163 | 163 | $errorMsg = |
164 | 164 | Craft::t('seomatic', 'Scenario: "') |
@@ -169,10 +169,10 @@ discard block |
||
169 | 169 | . print_r($this->render(), true); |
170 | 170 | Craft::info($errorMsg, __METHOD__); |
171 | 171 | foreach ($this->errors as $param => $errors) { |
172 | - $errorMsg = Craft::t('seomatic', $errorLabel) . $param; |
|
172 | + $errorMsg = Craft::t('seomatic', $errorLabel).$param; |
|
173 | 173 | /** @var array $errors */ |
174 | 174 | foreach ($errors as $error) { |
175 | - $errorMsg .= ' -> ' . $error; |
|
175 | + $errorMsg .= ' -> '.$error; |
|
176 | 176 | // Change the error level depending on the error message if this is a MetaJsonLD object |
177 | 177 | if ($isMetaJsonLdModel) { |
178 | 178 | if (strpos($error, 'recommended') !== false) { |
@@ -185,15 +185,15 @@ discard block |
||
185 | 185 | } |
186 | 186 | } |
187 | 187 | } |
188 | - Craft::info(strtoupper($logLevel) . ' - ' . $errorMsg, __METHOD__); |
|
188 | + Craft::info(strtoupper($logLevel).' - '.$errorMsg, __METHOD__); |
|
189 | 189 | // Extra debugging info for MetaJsonLd objects |
190 | 190 | if ($isMetaJsonLdModel) { |
191 | 191 | /** @var MetaJsonLd $className */ |
192 | 192 | $className = \get_class($this); |
193 | 193 | if (!empty($className::$schemaPropertyDescriptions[$param])) { |
194 | - $errorMsg = Craft::t('seomatic', $errorLabel) . $param; |
|
194 | + $errorMsg = Craft::t('seomatic', $errorLabel).$param; |
|
195 | 195 | /** @var $className MetaJsonLd */ |
196 | - $errorMsg .= ' -> ' . $className::$schemaPropertyDescriptions[$param]; |
|
196 | + $errorMsg .= ' -> '.$className::$schemaPropertyDescriptions[$param]; |
|
197 | 197 | Craft::info($errorMsg, __METHOD__); |
198 | 198 | } |
199 | 199 | } |