@@ -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)) { |
@@ -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 | } |
@@ -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; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | '{tagtype} tag `{key}` did not render because it is missing attributes.', |
182 | 182 | ['tagtype' => 'Link', 'key' => $this->key] |
183 | 183 | ); |
184 | - Craft::info('WARNING - ' . $error, __METHOD__); |
|
184 | + Craft::info('WARNING - '.$error, __METHOD__); |
|
185 | 185 | } |
186 | 186 | $shouldRender = false; |
187 | 187 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | public static function create($schemaType, array $config = []): MetaJsonLd |
119 | 119 | { |
120 | 120 | // Try the passed in $schemaType |
121 | - $className = self::SCHEMA_NAMESPACE_PREFIX . $schemaType; |
|
121 | + $className = self::SCHEMA_NAMESPACE_PREFIX.$schemaType; |
|
122 | 122 | /** @var $model MetaJsonLd */ |
123 | 123 | if (class_exists($className)) { |
124 | 124 | self::cleanProperties($className, $config); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | return new $className($config); |
127 | 127 | } |
128 | 128 | // Try the prefixed $schemaType |
129 | - $className = self::SCHEMA_NAMESPACE_PREFIX . self::SCHEMA_NAME_PREFIX . $schemaType; |
|
129 | + $className = self::SCHEMA_NAMESPACE_PREFIX.self::SCHEMA_NAME_PREFIX.$schemaType; |
|
130 | 130 | /** @var $model MetaJsonLd */ |
131 | 131 | if (class_exists($className)) { |
132 | 132 | self::cleanProperties($className, $config); |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | foreach ($dataToValidate as $data) { |
375 | 375 | /** @var array $expectedTypes */ |
376 | 376 | foreach ($expectedTypes as $expectedType) { |
377 | - $className = 'nystudio107\\seomatic\\models\\jsonld\\' . $expectedType; |
|
377 | + $className = 'nystudio107\\seomatic\\models\\jsonld\\'.$expectedType; |
|
378 | 378 | switch ($expectedType) { |
379 | 379 | // Text always validates |
380 | 380 | case 'Text': |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | } |
456 | 456 | } |
457 | 457 | if (!$validated) { |
458 | - $this->addError($attribute, 'Must be one of these types: ' . implode(', ', $expectedTypes)); |
|
458 | + $this->addError($attribute, 'Must be one of these types: '.implode(', ', $expectedTypes)); |
|
459 | 459 | } |
460 | 460 | } |
461 | 461 | } |
@@ -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; |
@@ -143,16 +143,16 @@ discard block |
||
143 | 143 | break; |
144 | 144 | } |
145 | 145 | // Handle the case of empty titles |
146 | - if ($prefix === (' ' . $separator . ' ')) { |
|
146 | + if ($prefix === (' '.$separator.' ')) { |
|
147 | 147 | $prefix = ''; |
148 | 148 | } |
149 | - if ($suffix === (' ' . $separator)) { |
|
149 | + if ($suffix === (' '.$separator)) { |
|
150 | 150 | $suffix = ''; |
151 | 151 | } |
152 | 152 | // Remove potential double spaces |
153 | 153 | $prefix = preg_replace('/\s+/', ' ', $prefix); |
154 | 154 | $suffix = preg_replace('/\s+/', ' ', $suffix); |
155 | - $lengthAdjust = mb_strlen($prefix . $suffix); |
|
155 | + $lengthAdjust = mb_strlen($prefix.$suffix); |
|
156 | 156 | // Parse the data |
157 | 157 | $scenario = $this->scenario; |
158 | 158 | $this->setScenario('render'); |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | '…' |
172 | 172 | ); |
173 | 173 | } |
174 | - $data = $prefix . $data . $suffix; |
|
174 | + $data = $prefix.$data.$suffix; |
|
175 | 175 | } else { |
176 | 176 | // If no title is provided, just use the site name |
177 | 177 | $data = MetaValueHelper::parseString($this->siteName); |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $data = trim($data); |
181 | 181 | // devMode |
182 | 182 | if (Seomatic::$devMode) { |
183 | - $data = Seomatic::$settings->devModeTitlePrefix . $data; |
|
183 | + $data = Seomatic::$settings->devModeTitlePrefix.$data; |
|
184 | 184 | } |
185 | 185 | } |
186 | 186 |