@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | 'name' => 'General', |
25 | 25 | 'description' => 'General Meta Tags', |
26 | 26 | 'handle' => TagService::GENERAL_HANDLE, |
27 | - 'class' => (string)MetaTagContainer::class, |
|
27 | + 'class' => (string) MetaTagContainer::class, |
|
28 | 28 | 'include' => true, |
29 | 29 | 'dependencies' => [ |
30 | 30 | ], |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | 'name' => 'Facebook', |
36 | 36 | 'description' => 'Facebook OpenGraph Meta Tags', |
37 | 37 | 'handle' => TagService::FACEBOOK_HANDLE, |
38 | - 'class' => (string)MetaTagContainer::class, |
|
38 | + 'class' => (string) MetaTagContainer::class, |
|
39 | 39 | 'include' => true, |
40 | 40 | 'dependencies' => [ |
41 | 41 | ], |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | 'name' => 'Twitter', |
47 | 47 | 'description' => 'Twitter Card Meta Tags', |
48 | 48 | 'handle' => TagService::TWITTER_HANDLE, |
49 | - 'class' => (string)MetaTagContainer::class, |
|
49 | + 'class' => (string) MetaTagContainer::class, |
|
50 | 50 | 'include' => true, |
51 | 51 | 'dependencies' => [ |
52 | 52 | ], |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | 'name' => 'Miscellaneous', |
58 | 58 | 'description' => 'Miscellaneous Meta Tags', |
59 | 59 | 'handle' => TagService::MISC_HANDLE, |
60 | - 'class' => (string)MetaTagContainer::class, |
|
60 | + 'class' => (string) MetaTagContainer::class, |
|
61 | 61 | 'include' => true, |
62 | 62 | 'dependencies' => [ |
63 | 63 | ], |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | Event::on( |
106 | 106 | CampaignTypesService::class, |
107 | 107 | CampaignTypesService::EVENT_AFTER_SAVE_CAMPAIGN_TYPE, |
108 | - function (CampaignTypeEvent $event) { |
|
108 | + function(CampaignTypeEvent $event) { |
|
109 | 109 | Craft::debug( |
110 | 110 | 'CampaignTypesService::EVENT_AFTER_SAVE_CAMPAIGN_TYPE', |
111 | 111 | __METHOD__ |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | Event::on( |
117 | 117 | CampaignTypesService::class, |
118 | 118 | CampaignTypesService::EVENT_AFTER_DELETE_CAMPAIGN_TYPE, |
119 | - function (CampaignTypeEvent $event) { |
|
119 | + function(CampaignTypeEvent $event) { |
|
120 | 120 | Craft::debug( |
121 | 121 | 'CampaignTypesService::EVENT_AFTER_DELETE_CAMPAIGN_TYPE', |
122 | 122 | __METHOD__ |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | Event::on( |
132 | 132 | CampaignTypesService::class, |
133 | 133 | CampaignTypesService::EVENT_AFTER_SAVE_CAMPAIGN_TYPE, |
134 | - function (CampaignTypeEvent $event) { |
|
134 | + function(CampaignTypeEvent $event) { |
|
135 | 135 | Craft::debug( |
136 | 136 | 'CampaignTypesService::EVENT_AFTER_SAVE_CAMPAIGN_TYPE', |
137 | 137 | __METHOD__ |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | Event::on( |
155 | 155 | CampaignTypesService::class, |
156 | 156 | CampaignTypesService::EVENT_AFTER_DELETE_CAMPAIGN_TYPE, |
157 | - function (CampaignTypeEvent $event) { |
|
157 | + function(CampaignTypeEvent $event) { |
|
158 | 158 | Craft::debug( |
159 | 159 | 'CampaignTypesService::EVENT_AFTER_DELETE_CAMPAIGN_TYPE', |
160 | 160 | __METHOD__ |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | Event::on( |
184 | 184 | CampaignElement::class, |
185 | 185 | CampaignElement::EVENT_DEFINE_SIDEBAR_HTML, |
186 | - static function (DefineHtmlEvent $event) { |
|
186 | + static function(DefineHtmlEvent $event) { |
|
187 | 187 | Craft::debug( |
188 | 188 | 'CampaignElement::EVENT_DEFINE_SIDEBAR_HTML', |
189 | 189 | __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 | ); |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | Event::on(MetaContainers::class, |
48 | 48 | MetaContainers::EVENT_METABUNDLE_DEBUG_DATA, |
49 | - function (MetaBundleDebugDataEvent $e) { |
|
49 | + function(MetaBundleDebugDataEvent $e) { |
|
50 | 50 | if ($e->metaBundle) { |
51 | 51 | $this->metaBundles[$e->metaBundleCategory] = $e->metaBundle; |
52 | 52 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function getSummary(): string |
69 | 69 | { |
70 | - return Craft::$app->getView()->render($this->viewPath . 'summary', ['panel' => $this]); |
|
70 | + return Craft::$app->getView()->render($this->viewPath.'summary', ['panel' => $this]); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function getDetail(): string |
77 | 77 | { |
78 | - return Craft::$app->getView()->render($this->viewPath . 'detail', ['panel' => $this]); |
|
78 | + return Craft::$app->getView()->render($this->viewPath.'detail', ['panel' => $this]); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
@@ -164,7 +164,7 @@ |
||
164 | 164 | $content .= $this->render('rendered-tags', [ |
165 | 165 | 'values' => [ |
166 | 166 | 'renderedTags' => $panel->data[$metaBundleCategory]['renderedTags'][$metaContainerName] ?? [], |
167 | - 'id' => $sectionName . '-' . $metaBundleCategory . '-' . $metaContainerName . '-rendered-tags', |
|
167 | + 'id' => $sectionName.'-'.$metaBundleCategory.'-'.$metaContainerName.'-rendered-tags', |
|
168 | 168 | 'view' => $this, |
169 | 169 | 'language' => $editorLanguage, |
170 | 170 | ] |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $className = MetaTag::class; |
80 | 80 | if ($tagType) { |
81 | 81 | // Potentially load a sub-type of MetaTag |
82 | - $tagClassName = 'nystudio107\\seomatic\\models\\metatag\\' . ucfirst($tagType) . 'Tag'; |
|
82 | + $tagClassName = 'nystudio107\\seomatic\\models\\metatag\\'.ucfirst($tagType).'Tag'; |
|
83 | 83 | /** @var $model MetaTag */ |
84 | 84 | if (class_exists($tagClassName)) { |
85 | 85 | $className = $tagClassName; |
@@ -155,10 +155,10 @@ discard block |
||
155 | 155 | if (Seomatic::$devMode) { |
156 | 156 | $error = Craft::t( |
157 | 157 | 'seomatic', |
158 | - '{tagtype} tag `{key}` did not render because it is missing attributes. ' . print_r($data, true), |
|
158 | + '{tagtype} tag `{key}` did not render because it is missing attributes. '.print_r($data, true), |
|
159 | 159 | ['tagtype' => 'Meta', 'key' => $this->key] |
160 | 160 | ); |
161 | - Craft::info('WARNING - ' . $error, __METHOD__); |
|
161 | + Craft::info('WARNING - '.$error, __METHOD__); |
|
162 | 162 | } |
163 | 163 | $shouldRender = false; |
164 | 164 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | foreach ($configs as $config) { |
183 | 183 | if ($this->prepForRender($config)) { |
184 | 184 | ksort($config); |
185 | - $html .= Html::tag('meta', '', $config) . $linebreak; |
|
185 | + $html .= Html::tag('meta', '', $config).$linebreak; |
|
186 | 186 | } |
187 | 187 | } |
188 | 188 |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $className = MetaLink::class; |
86 | 86 | if ($tagType) { |
87 | 87 | // Potentially load a sub-type of MetaTag |
88 | - $tagClassName = 'nystudio107\\seomatic\\models\\metalink\\' . ucfirst($tagType) . 'Link'; |
|
88 | + $tagClassName = 'nystudio107\\seomatic\\models\\metalink\\'.ucfirst($tagType).'Link'; |
|
89 | 89 | /** @var $model MetaLink */ |
90 | 90 | if (class_exists($tagClassName)) { |
91 | 91 | $className = $tagClassName; |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | '{tagtype} tag `{key}` did not render because it is missing attributes.', |
183 | 183 | ['tagtype' => 'Link', 'key' => $this->key] |
184 | 184 | ); |
185 | - Craft::info('WARNING - ' . $error, __METHOD__); |
|
185 | + Craft::info('WARNING - '.$error, __METHOD__); |
|
186 | 186 | } |
187 | 187 | $shouldRender = false; |
188 | 188 | } |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | foreach ($configs as $config) { |
207 | 207 | if ($this->prepForRender($config)) { |
208 | 208 | ksort($config); |
209 | - $html .= Html::tag('link', '', $config) . $linebreak; |
|
209 | + $html .= Html::tag('link', '', $config).$linebreak; |
|
210 | 210 | } |
211 | 211 | } |
212 | 212 |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | public static function create($schemaType, array $config = []): MetaJsonLd |
120 | 120 | { |
121 | 121 | // Try the passed in $schemaType |
122 | - $className = self::SCHEMA_NAMESPACE_PREFIX . $schemaType; |
|
122 | + $className = self::SCHEMA_NAMESPACE_PREFIX.$schemaType; |
|
123 | 123 | /** @var $model MetaJsonLd */ |
124 | 124 | if (class_exists($className)) { |
125 | 125 | self::cleanProperties($className, $config); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | return new $className($config); |
128 | 128 | } |
129 | 129 | // Try the prefixed $schemaType |
130 | - $className = self::SCHEMA_NAMESPACE_PREFIX . self::SCHEMA_NAME_PREFIX . $schemaType; |
|
130 | + $className = self::SCHEMA_NAMESPACE_PREFIX.self::SCHEMA_NAME_PREFIX.$schemaType; |
|
131 | 131 | /** @var $model MetaJsonLd */ |
132 | 132 | if (class_exists($className)) { |
133 | 133 | self::cleanProperties($className, $config); |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | foreach ($dataToValidate as $key => $data) { |
386 | 386 | /** @var array $expectedTypes */ |
387 | 387 | foreach ($expectedTypes as $expectedType) { |
388 | - $className = 'nystudio107\\seomatic\\models\\jsonld\\' . $expectedType; |
|
388 | + $className = 'nystudio107\\seomatic\\models\\jsonld\\'.$expectedType; |
|
389 | 389 | switch ($expectedType) { |
390 | 390 | // Text always validates |
391 | 391 | case 'Text': |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | case 'Date': |
426 | 426 | $validator = new DateValidator; |
427 | 427 | $validator->type = DateValidator::TYPE_DATE; |
428 | - $validator->format = 'php:' . DateTime::ATOM; |
|
428 | + $validator->format = 'php:'.DateTime::ATOM; |
|
429 | 429 | if ($validator->validate($data, $error)) { |
430 | 430 | $validated = true; |
431 | 431 | } |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | $validated = true; |
472 | 472 | } |
473 | 473 | if (is_string($data)) { |
474 | - $targetClass = 'nystudio107\\seomatic\\models\\jsonld\\' . $data; |
|
474 | + $targetClass = 'nystudio107\\seomatic\\models\\jsonld\\'.$data; |
|
475 | 475 | if (class_exists($targetClass)) { |
476 | 476 | $validated = true; |
477 | 477 | } |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | } |
481 | 481 | } |
482 | 482 | if (!$validated) { |
483 | - $this->addError($attribute, 'Must be one of these types: ' . implode(', ', $expectedTypes)); |
|
483 | + $this->addError($attribute, 'Must be one of these types: '.implode(', ', $expectedTypes)); |
|
484 | 484 | } |
485 | 485 | } |
486 | 486 | } |
@@ -51,16 +51,16 @@ |
||
51 | 51 | public function includeMetaData($dependency) |
52 | 52 | { |
53 | 53 | Craft::beginProfile('MetaJsonLdContainer::includeMetaData', __METHOD__); |
54 | - $uniqueKey = $this->handle . $dependency->tags[3] . '-v2'; |
|
54 | + $uniqueKey = $this->handle.$dependency->tags[3].'-v2'; |
|
55 | 55 | $cache = Craft::$app->getCache(); |
56 | 56 | if ($this->clearCache) { |
57 | 57 | TagDependency::invalidate($cache, $dependency->tags[3]); |
58 | 58 | } |
59 | 59 | [$jsonLd, $attrs] = $cache->getOrSet( |
60 | - self::CONTAINER_TYPE . $uniqueKey, |
|
61 | - function () use ($uniqueKey) { |
|
60 | + self::CONTAINER_TYPE.$uniqueKey, |
|
61 | + function() use ($uniqueKey) { |
|
62 | 62 | Craft::info( |
63 | - self::CONTAINER_TYPE . ' cache miss: ' . $uniqueKey, |
|
63 | + self::CONTAINER_TYPE.' cache miss: '.$uniqueKey, |
|
64 | 64 | __METHOD__ |
65 | 65 | ); |
66 | 66 |
@@ -55,16 +55,16 @@ discard block |
||
55 | 55 | public function includeMetaData($dependency) |
56 | 56 | { |
57 | 57 | Craft::beginProfile('MetaScriptContainer::includeMetaData', __METHOD__); |
58 | - $uniqueKey = $this->handle . $dependency->tags[3] . $this->dataLayerHash(); |
|
58 | + $uniqueKey = $this->handle.$dependency->tags[3].$this->dataLayerHash(); |
|
59 | 59 | $cache = Craft::$app->getCache(); |
60 | 60 | if ($this->clearCache) { |
61 | 61 | TagDependency::invalidate($cache, $dependency->tags[3]); |
62 | 62 | } |
63 | 63 | $tagData = $cache->getOrSet( |
64 | - self::CONTAINER_TYPE . $uniqueKey, |
|
65 | - function () use ($uniqueKey) { |
|
64 | + self::CONTAINER_TYPE.$uniqueKey, |
|
65 | + function() use ($uniqueKey) { |
|
66 | 66 | Craft::info( |
67 | - self::CONTAINER_TYPE . ' cache miss: ' . $uniqueKey, |
|
67 | + self::CONTAINER_TYPE.' cache miss: '.$uniqueKey, |
|
68 | 68 | __METHOD__ |
69 | 69 | ); |
70 | 70 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | 'jQuery(window).load()', |
141 | 141 | ]; |
142 | 142 | $position = $positionNames[$config['position'] - 1] ?? 'unknown'; |
143 | - $html .= "<!-- Position: {$position} -->" . PHP_EOL; |
|
143 | + $html .= "<!-- Position: {$position} -->".PHP_EOL; |
|
144 | 144 | } |
145 | 145 | if ($bodyJs || !$params['renderScriptTags']) { |
146 | 146 | $html .= $config['js']; |