@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $suffix = ''; |
| 126 | 126 | break; |
| 127 | 127 | } |
| 128 | - $lengthAdjust = mb_strlen($prefix . $suffix); |
|
| 128 | + $lengthAdjust = mb_strlen($prefix.$suffix); |
|
| 129 | 129 | // Truncate the twitter:title tag content |
| 130 | 130 | $truncLen = Seomatic::$settings->maxTitleLength - $lengthAdjust; |
| 131 | 131 | if ($truncLen < 0) { |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | '…' |
| 139 | 139 | ); |
| 140 | 140 | } |
| 141 | - $data['content'] = $prefix . $data['content'] . $suffix; |
|
| 141 | + $data['content'] = $prefix.$data['content'].$suffix; |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | return $shouldRender; |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $suffix = ''; |
| 126 | 126 | break; |
| 127 | 127 | } |
| 128 | - $lengthAdjust = mb_strlen($prefix . $suffix); |
|
| 128 | + $lengthAdjust = mb_strlen($prefix.$suffix); |
|
| 129 | 129 | // Truncate the og:title tag content |
| 130 | 130 | $truncLen = Seomatic::$settings->maxTitleLength - $lengthAdjust; |
| 131 | 131 | if ($truncLen < 0) { |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | '…' |
| 139 | 139 | ); |
| 140 | 140 | } |
| 141 | - $data['content'] = $prefix . $data['content'] . $suffix; |
|
| 141 | + $data['content'] = $prefix.$data['content'].$suffix; |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | return $shouldRender; |
@@ -58,8 +58,8 @@ discard block |
||
| 58 | 58 | // Constants aren't allowed in traits until PHP >= 8.2 |
| 59 | 59 | $majorVersion = '3'; |
| 60 | 60 | // Dev server container name & port are based on the major version of this plugin |
| 61 | - $devPort = 3000 + (int)$majorVersion; |
|
| 62 | - $versionName = 'v' . $majorVersion; |
|
| 61 | + $devPort = 3000 + (int) $majorVersion; |
|
| 62 | + $versionName = 'v'.$majorVersion; |
|
| 63 | 63 | // Merge in the passed config, so it our config can be overridden by Plugins::pluginConfigs['vite'] |
| 64 | 64 | // ref: https://github.com/craftcms/cms/issues/1989 |
| 65 | 65 | $config = ArrayHelper::merge([ |
@@ -80,8 +80,8 @@ discard block |
||
| 80 | 80 | 'assetClass' => SeomaticAsset::class, |
| 81 | 81 | 'checkDevServer' => true, |
| 82 | 82 | 'class' => VitePluginService::class, |
| 83 | - 'devServerInternal' => 'http://craft-seomatic-' . $versionName . '-buildchain-dev:' . $devPort, |
|
| 84 | - 'devServerPublic' => 'http://localhost:' . $devPort, |
|
| 83 | + 'devServerInternal' => 'http://craft-seomatic-'.$versionName.'-buildchain-dev:'.$devPort, |
|
| 84 | + 'devServerPublic' => 'http://localhost:'.$devPort, |
|
| 85 | 85 | 'errorEntry' => 'src/js/seomatic.js', |
| 86 | 86 | 'useDevServer' => true, |
| 87 | 87 | ], |
@@ -20,11 +20,11 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | return [ |
| 23 | - MetaTagContainer::CONTAINER_TYPE . TagService::GENERAL_HANDLE => [ |
|
| 23 | + MetaTagContainer::CONTAINER_TYPE.TagService::GENERAL_HANDLE => [ |
|
| 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 | ], |
@@ -76,11 +76,11 @@ discard block |
||
| 76 | 76 | ], |
| 77 | 77 | ], |
| 78 | 78 | ], |
| 79 | - MetaTagContainer::CONTAINER_TYPE . TagService::FACEBOOK_HANDLE => [ |
|
| 79 | + MetaTagContainer::CONTAINER_TYPE.TagService::FACEBOOK_HANDLE => [ |
|
| 80 | 80 | 'name' => 'Facebook', |
| 81 | 81 | 'description' => 'Facebook OpenGraph Meta Tags', |
| 82 | 82 | 'handle' => TagService::FACEBOOK_HANDLE, |
| 83 | - 'class' => (string)MetaTagContainer::class, |
|
| 83 | + 'class' => (string) MetaTagContainer::class, |
|
| 84 | 84 | 'include' => true, |
| 85 | 85 | 'dependencies' => [ |
| 86 | 86 | ], |
@@ -206,12 +206,12 @@ discard block |
||
| 206 | 206 | ], |
| 207 | 207 | ], |
| 208 | 208 | ], |
| 209 | - MetaTagContainer::CONTAINER_TYPE . TagService::TWITTER_HANDLE => [ |
|
| 209 | + MetaTagContainer::CONTAINER_TYPE.TagService::TWITTER_HANDLE => [ |
|
| 210 | 210 | 'name' => 'Twitter', |
| 211 | 211 | 'description' => 'Twitter Card Meta Tags', |
| 212 | 212 | 'handle' => TagService::TWITTER_HANDLE, |
| 213 | 213 | 'include' => true, |
| 214 | - 'class' => (string)MetaTagContainer::class, |
|
| 214 | + 'class' => (string) MetaTagContainer::class, |
|
| 215 | 215 | 'data' => [ |
| 216 | 216 | 'twitter:card' => [ |
| 217 | 217 | 'charset' => '', |
@@ -287,11 +287,11 @@ discard block |
||
| 287 | 287 | ], |
| 288 | 288 | ], |
| 289 | 289 | ], |
| 290 | - MetaTagContainer::CONTAINER_TYPE . TagService::MISC_HANDLE => [ |
|
| 290 | + MetaTagContainer::CONTAINER_TYPE.TagService::MISC_HANDLE => [ |
|
| 291 | 291 | 'name' => 'Miscellaneous', |
| 292 | 292 | 'description' => 'Miscellaneous Meta Tags', |
| 293 | 293 | 'handle' => TagService::MISC_HANDLE, |
| 294 | - 'class' => (string)MetaTagContainer::class, |
|
| 294 | + 'class' => (string) MetaTagContainer::class, |
|
| 295 | 295 | 'include' => true, |
| 296 | 296 | 'dependencies' => [ |
| 297 | 297 | ], |
@@ -20,11 +20,11 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | return [ |
| 23 | - MetaScriptContainer::CONTAINER_TYPE . ScriptService::GENERAL_HANDLE => [ |
|
| 23 | + MetaScriptContainer::CONTAINER_TYPE.ScriptService::GENERAL_HANDLE => [ |
|
| 24 | 24 | 'name' => 'General', |
| 25 | 25 | 'description' => 'Script Tags', |
| 26 | 26 | 'handle' => ScriptService::GENERAL_HANDLE, |
| 27 | - 'class' => (string)MetaScriptContainer::class, |
|
| 27 | + 'class' => (string) MetaScriptContainer::class, |
|
| 28 | 28 | 'include' => true, |
| 29 | 29 | 'dependencies' => [ |
| 30 | 30 | ], |
@@ -19,11 +19,11 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | |
| 21 | 21 | return [ |
| 22 | - MetaTitleContainer::CONTAINER_TYPE . TitleService::GENERAL_HANDLE => [ |
|
| 22 | + MetaTitleContainer::CONTAINER_TYPE.TitleService::GENERAL_HANDLE => [ |
|
| 23 | 23 | 'name' => 'General', |
| 24 | 24 | 'description' => 'Meta Title Tag', |
| 25 | 25 | 'handle' => TitleService::GENERAL_HANDLE, |
| 26 | - 'class' => (string)MetaTitleContainer::class, |
|
| 26 | + 'class' => (string) MetaTitleContainer::class, |
|
| 27 | 27 | 'include' => true, |
| 28 | 28 | 'dependencies' => [ |
| 29 | 29 | ], |
@@ -19,11 +19,11 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | |
| 21 | 21 | return [ |
| 22 | - MetaJsonLdContainer::CONTAINER_TYPE . JsonLdService::GENERAL_HANDLE => [ |
|
| 22 | + MetaJsonLdContainer::CONTAINER_TYPE.JsonLdService::GENERAL_HANDLE => [ |
|
| 23 | 23 | 'name' => 'General', |
| 24 | 24 | 'description' => 'JsonLd Tags', |
| 25 | 25 | 'handle' => JsonLdService::GENERAL_HANDLE, |
| 26 | - 'class' => (string)MetaJsonLdContainer::class, |
|
| 26 | + 'class' => (string) MetaJsonLdContainer::class, |
|
| 27 | 27 | 'include' => true, |
| 28 | 28 | 'dependencies' => [ |
| 29 | 29 | ], |
@@ -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 | |