@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | Event::on( |
109 | 109 | Sections::class, |
110 | 110 | Sections::EVENT_AFTER_SAVE_SECTION, |
111 | - function (SectionEvent $event) { |
|
111 | + function(SectionEvent $event) { |
|
112 | 112 | Craft::debug( |
113 | 113 | 'Sections::EVENT_AFTER_SAVE_SECTION', |
114 | 114 | __METHOD__ |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | Event::on( |
120 | 120 | Sections::class, |
121 | 121 | Sections::EVENT_AFTER_DELETE_SECTION, |
122 | - function (SectionEvent $event) { |
|
122 | + function(SectionEvent $event) { |
|
123 | 123 | Craft::debug( |
124 | 124 | 'Sections::EVENT_AFTER_DELETE_SECTION', |
125 | 125 | __METHOD__ |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | Event::on( |
135 | 135 | Sections::class, |
136 | 136 | Sections::EVENT_AFTER_SAVE_SECTION, |
137 | - function (SectionEvent $event) { |
|
137 | + function(SectionEvent $event) { |
|
138 | 138 | Craft::debug( |
139 | 139 | 'Sections::EVENT_AFTER_SAVE_SECTION', |
140 | 140 | __METHOD__ |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | Event::on( |
158 | 158 | Sections::class, |
159 | 159 | Sections::EVENT_AFTER_DELETE_SECTION, |
160 | - function (SectionEvent $event) { |
|
160 | + function(SectionEvent $event) { |
|
161 | 161 | Craft::debug( |
162 | 162 | 'Sections::EVENT_AFTER_DELETE_SECTION', |
163 | 163 | __METHOD__ |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | Event::on( |
187 | 187 | Entry::class, |
188 | 188 | Entry::EVENT_DEFINE_SIDEBAR_HTML, |
189 | - static function (DefineHtmlEvent $event) { |
|
189 | + static function(DefineHtmlEvent $event) { |
|
190 | 190 | Craft::debug( |
191 | 191 | 'Entry::EVENT_DEFINE_SIDEBAR_HTML', |
192 | 192 | __METHOD__ |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | ->limit($metaBundle->metaSitemapVars->sitemapLimit); |
228 | 228 | if ($metaBundle->sourceType === 'structure' |
229 | 229 | && !empty($metaBundle->metaSitemapVars->structureDepth)) { |
230 | - $query->level($metaBundle->metaSitemapVars->structureDepth . '<='); |
|
230 | + $query->level($metaBundle->metaSitemapVars->structureDepth.'<='); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | return $query; |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | ConfigHelper::getConfigFromFile(self::configFilePath()), |
396 | 396 | [ |
397 | 397 | 'sourceId' => $sourceModel->id, |
398 | - 'sourceName' => (string)$sourceModel->name, |
|
398 | + 'sourceName' => (string) $sourceModel->name, |
|
399 | 399 | 'sourceHandle' => $sourceModel->handle, |
400 | 400 | 'sourceType' => $sourceModel->type, |
401 | 401 | ] |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | BaseEvent::on( |
87 | 87 | CalendarsService::class, |
88 | 88 | CalendarsService::EVENT_AFTER_SAVE, |
89 | - function (SaveModelEvent $event) { |
|
89 | + function(SaveModelEvent $event) { |
|
90 | 90 | Craft::debug( |
91 | 91 | 'CalendarsService::EVENT_AFTER_DELETE', |
92 | 92 | __METHOD__ |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | BaseEvent::on( |
98 | 98 | CalendarsService::class, |
99 | 99 | CalendarsService::EVENT_AFTER_DELETE, |
100 | - function (SaveModelEvent $event) { |
|
100 | + function(SaveModelEvent $event) { |
|
101 | 101 | Craft::debug( |
102 | 102 | 'CalendarsService::EVENT_AFTER_DELETE', |
103 | 103 | __METHOD__ |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | BaseEvent::on( |
113 | 113 | CalendarsService::class, |
114 | 114 | CalendarsService::EVENT_AFTER_SAVE, |
115 | - function (SaveModelEvent $event) { |
|
115 | + function(SaveModelEvent $event) { |
|
116 | 116 | Craft::debug( |
117 | 117 | 'CalendarsService::EVENT_AFTER_SAVE', |
118 | 118 | __METHOD__ |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | BaseEvent::on( |
138 | 138 | CalendarsService::class, |
139 | 139 | CalendarsService::EVENT_AFTER_DELETE, |
140 | - function (DeleteModelEvent $event) { |
|
140 | + function(DeleteModelEvent $event) { |
|
141 | 141 | Craft::debug( |
142 | 142 | 'CalendarsService::EVENT_AFTER_DELETE', |
143 | 143 | __METHOD__ |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | BaseEvent::on( |
169 | 169 | Event::class, |
170 | 170 | Event::EVENT_DEFINE_SIDEBAR_HTML, |
171 | - static function (DefineHtmlEvent $event) { |
|
171 | + static function(DefineHtmlEvent $event) { |
|
172 | 172 | Craft::debug( |
173 | 173 | 'Entry::EVENT_DEFINE_SIDEBAR_HTML', |
174 | 174 | __METHOD__ |
@@ -243,8 +243,8 @@ discard block |
||
243 | 243 | $query = Event::find() |
244 | 244 | ->setCalendar($metaBundle->sourceHandle) |
245 | 245 | ->setLoadOccurrences(false) |
246 | - ->siteId((int)$metaBundle->sourceSiteId) |
|
247 | - ->limit((int)$metaBundle->metaSitemapVars->sitemapLimit); |
|
246 | + ->siteId((int) $metaBundle->sourceSiteId) |
|
247 | + ->limit((int) $metaBundle->metaSitemapVars->sitemapLimit); |
|
248 | 248 | |
249 | 249 | return $query; |
250 | 250 | } |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | ConfigHelper::getConfigFromFile(self::configFilePath()), |
406 | 406 | [ |
407 | 407 | 'sourceId' => $sourceModel->id, |
408 | - 'sourceName' => (string)$sourceModel->name, |
|
408 | + 'sourceName' => (string) $sourceModel->name, |
|
409 | 409 | 'sourceHandle' => $sourceModel->handle, |
410 | 410 | ] |
411 | 411 | ); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | Event::on( |
107 | 107 | ProductTypes::class, |
108 | 108 | ProductTypes::EVENT_AFTER_SAVE_PRODUCTTYPE, |
109 | - function (ProductTypeEvent $event) { |
|
109 | + function(ProductTypeEvent $event) { |
|
110 | 110 | Craft::debug( |
111 | 111 | 'ProductTypes::EVENT_AFTER_SAVE_PRODUCTTYPE', |
112 | 112 | __METHOD__ |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | Event::on( |
122 | 122 | ProductTypes::class, |
123 | 123 | ProductTypes::EVENT_AFTER_SAVE_PRODUCTTYPE, |
124 | - static function (ProductTypeEvent $event) { |
|
124 | + static function(ProductTypeEvent $event) { |
|
125 | 125 | Craft::debug( |
126 | 126 | 'ProductTypes::EVENT_AFTER_SAVE_PRODUCTTYPE', |
127 | 127 | __METHOD__ |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | Event::on( |
177 | 177 | Product::class, |
178 | 178 | Product::EVENT_DEFINE_SIDEBAR_HTML, |
179 | - static function (DefineHtmlEvent $event) { |
|
179 | + static function(DefineHtmlEvent $event) { |
|
180 | 180 | Craft::debug( |
181 | 181 | 'Product::EVENT_DEFINE_SIDEBAR_HTML', |
182 | 182 | __METHOD__ |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | ConfigHelper::getConfigFromFile(self::configFilePath()), |
386 | 386 | [ |
387 | 387 | 'sourceId' => $sourceModel->id, |
388 | - 'sourceName' => (string)$sourceModel->name, |
|
388 | + 'sourceName' => (string) $sourceModel->name, |
|
389 | 389 | 'sourceHandle' => $sourceModel->handle, |
390 | 390 | ] |
391 | 391 | ); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | Event::on( |
107 | 107 | Categories::class, |
108 | 108 | Categories::EVENT_AFTER_SAVE_GROUP, |
109 | - function (CategoryGroupEvent $event) { |
|
109 | + function(CategoryGroupEvent $event) { |
|
110 | 110 | Craft::debug( |
111 | 111 | 'Categories::EVENT_AFTER_SAVE_GROUP', |
112 | 112 | __METHOD__ |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | Event::on( |
118 | 118 | Categories::class, |
119 | 119 | Categories::EVENT_AFTER_DELETE_GROUP, |
120 | - function (CategoryGroupEvent $event) { |
|
120 | + function(CategoryGroupEvent $event) { |
|
121 | 121 | Craft::debug( |
122 | 122 | 'Categories::EVENT_AFTER_DELETE_GROUP', |
123 | 123 | __METHOD__ |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | Event::on( |
133 | 133 | Categories::class, |
134 | 134 | Categories::EVENT_AFTER_SAVE_GROUP, |
135 | - function (CategoryGroupEvent $event) { |
|
135 | + function(CategoryGroupEvent $event) { |
|
136 | 136 | Craft::debug( |
137 | 137 | 'Categories::EVENT_AFTER_SAVE_GROUP', |
138 | 138 | __METHOD__ |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | Event::on( |
156 | 156 | Categories::class, |
157 | 157 | Categories::EVENT_AFTER_DELETE_GROUP, |
158 | - function (CategoryGroupEvent $event) { |
|
158 | + function(CategoryGroupEvent $event) { |
|
159 | 159 | Craft::debug( |
160 | 160 | 'Categories::EVENT_AFTER_DELETE_GROUP', |
161 | 161 | __METHOD__ |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | Event::on( |
185 | 185 | Category::class, |
186 | 186 | Category::EVENT_DEFINE_SIDEBAR_HTML, |
187 | - static function (DefineHtmlEvent $event) { |
|
187 | + static function(DefineHtmlEvent $event) { |
|
188 | 188 | Craft::debug( |
189 | 189 | 'Category::EVENT_DEFINE_SIDEBAR_HTML', |
190 | 190 | __METHOD__ |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | ->siteId($metaBundle->sourceSiteId) |
225 | 225 | ->limit($metaBundle->metaSitemapVars->sitemapLimit); |
226 | 226 | if (!empty($metaBundle->metaSitemapVars->structureDepth)) { |
227 | - $query->level($metaBundle->metaSitemapVars->structureDepth . '<='); |
|
227 | + $query->level($metaBundle->metaSitemapVars->structureDepth.'<='); |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | return $query; |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | ConfigHelper::getConfigFromFile(self::configFilePath()), |
382 | 382 | [ |
383 | 383 | 'sourceId' => $sourceModel->id, |
384 | - 'sourceName' => (string)$sourceModel->name, |
|
384 | + 'sourceName' => (string) $sourceModel->name, |
|
385 | 385 | 'sourceHandle' => $sourceModel->handle, |
386 | 386 | ] |
387 | 387 | ); |
@@ -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 | } |
@@ -127,16 +127,16 @@ discard block |
||
127 | 127 | $dependency = new TagDependency([ |
128 | 128 | 'tags' => [ |
129 | 129 | self::GLOBAL_SITEMAP_CACHE_TAG, |
130 | - self::SITEMAP_CACHE_TAG . $handle . $siteId, |
|
130 | + self::SITEMAP_CACHE_TAG.$handle.$siteId, |
|
131 | 131 | ], |
132 | 132 | ]); |
133 | 133 | |
134 | - return $cache->getOrSet(self::CACHE_KEY . $groupId . self::CUSTOM_SCOPE . $handle . $siteId, function () use ( |
|
134 | + return $cache->getOrSet(self::CACHE_KEY.$groupId.self::CUSTOM_SCOPE.$handle.$siteId, function() use ( |
|
135 | 135 | $handle, |
136 | 136 | $siteId |
137 | 137 | ) { |
138 | 138 | Craft::info( |
139 | - 'Sitemap Custom cache miss: ' . $handle . '/' . $siteId, |
|
139 | + 'Sitemap Custom cache miss: '.$handle.'/'.$siteId, |
|
140 | 140 | __METHOD__ |
141 | 141 | ); |
142 | 142 | $lines = []; |
@@ -211,9 +211,9 @@ discard block |
||
211 | 211 | { |
212 | 212 | $handle = self::CUSTOM_HANDLE; |
213 | 213 | $cache = Craft::$app->getCache(); |
214 | - TagDependency::invalidate($cache, self::SITEMAP_CACHE_TAG . $handle . $siteId); |
|
214 | + TagDependency::invalidate($cache, self::SITEMAP_CACHE_TAG.$handle.$siteId); |
|
215 | 215 | Craft::info( |
216 | - 'Sitemap Custom cache cleared: ' . $handle, |
|
216 | + 'Sitemap Custom cache cleared: '.$handle, |
|
217 | 217 | __METHOD__ |
218 | 218 | ); |
219 | 219 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function getFilename(int $groupId): string |
119 | 119 | { |
120 | - return 'sitemaps-' . $groupId . '-sitemap.xml'; |
|
120 | + return 'sitemaps-'.$groupId.'-sitemap.xml'; |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | ], |
151 | 151 | ]); |
152 | 152 | |
153 | - return $cache->getOrSet(self::CACHE_KEY . $groupId . '.' . $siteId, function () use ($groupSiteIds, $siteId) { |
|
153 | + return $cache->getOrSet(self::CACHE_KEY.$groupId.'.'.$siteId, function() use ($groupSiteIds, $siteId) { |
|
154 | 154 | Craft::info( |
155 | 155 | 'Sitemap index cache miss', |
156 | 156 | __METHOD__ |
@@ -225,10 +225,10 @@ |
||
225 | 225 | } |
226 | 226 | // Make sure these are strings |
227 | 227 | if (!empty($this->facebookProfileId)) { |
228 | - $this->facebookProfileId = (string)$this->facebookProfileId; |
|
228 | + $this->facebookProfileId = (string) $this->facebookProfileId; |
|
229 | 229 | } |
230 | 230 | if (!empty($this->facebookAppId)) { |
231 | - $this->facebookAppId = (string)$this->facebookAppId; |
|
231 | + $this->facebookAppId = (string) $this->facebookAppId; |
|
232 | 232 | } |
233 | 233 | // Identity |
234 | 234 | if ($this->identity !== null && is_array($this->identity)) { |