@@ -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']; |
@@ -42,11 +42,11 @@ discard block |
||
| 42 | 42 | // Constants |
| 43 | 43 | // ========================================================================= |
| 44 | 44 | |
| 45 | - const SEOMATIC_SITEMAPINDEX_CONTAINER = Seomatic::SEOMATIC_HANDLE . SitemapIndexTemplate::TEMPLATE_TYPE; |
|
| 45 | + const SEOMATIC_SITEMAPINDEX_CONTAINER = Seomatic::SEOMATIC_HANDLE.SitemapIndexTemplate::TEMPLATE_TYPE; |
|
| 46 | 46 | |
| 47 | - const SEOMATIC_SITEMAP_CONTAINER = Seomatic::SEOMATIC_HANDLE . SitemapTemplate::TEMPLATE_TYPE; |
|
| 47 | + const SEOMATIC_SITEMAP_CONTAINER = Seomatic::SEOMATIC_HANDLE.SitemapTemplate::TEMPLATE_TYPE; |
|
| 48 | 48 | |
| 49 | - const SEOMATIC_SITEMAPCUSTOM_CONTAINER = Seomatic::SEOMATIC_HANDLE . SitemapCustomTemplate::TEMPLATE_TYPE; |
|
| 49 | + const SEOMATIC_SITEMAPCUSTOM_CONTAINER = Seomatic::SEOMATIC_HANDLE.SitemapCustomTemplate::TEMPLATE_TYPE; |
|
| 50 | 50 | |
| 51 | 51 | const SEARCH_ENGINE_SUBMISSION_URLS = [ |
| 52 | 52 | ]; |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | Event::on( |
| 91 | 91 | UrlManager::class, |
| 92 | 92 | UrlManager::EVENT_REGISTER_SITE_URL_RULES, |
| 93 | - function (RegisterUrlRulesEvent $event) { |
|
| 93 | + function(RegisterUrlRulesEvent $event) { |
|
| 94 | 94 | Craft::debug( |
| 95 | 95 | 'UrlManager::EVENT_REGISTER_SITE_URL_RULES', |
| 96 | 96 | __METHOD__ |
@@ -243,19 +243,19 @@ discard block |
||
| 243 | 243 | $siteId = $groupSiteIds[0]; |
| 244 | 244 | $sitemapIndexUrl = $this->sitemapIndexUrlForSiteId($siteId); |
| 245 | 245 | if (!empty($sitemapIndexUrl)) { |
| 246 | - $submissionUrl = $url . urlencode($sitemapIndexUrl); |
|
| 246 | + $submissionUrl = $url.urlencode($sitemapIndexUrl); |
|
| 247 | 247 | // create new guzzle client |
| 248 | 248 | $guzzleClient = Craft::createGuzzleClient(['timeout' => 5, 'connect_timeout' => 5]); |
| 249 | 249 | // Submit the sitemap index to each search engine |
| 250 | 250 | try { |
| 251 | 251 | $guzzleClient->post($submissionUrl); |
| 252 | 252 | Craft::info( |
| 253 | - 'Sitemap index submitted to: ' . $submissionUrl, |
|
| 253 | + 'Sitemap index submitted to: '.$submissionUrl, |
|
| 254 | 254 | __METHOD__ |
| 255 | 255 | ); |
| 256 | 256 | } catch (\Exception $e) { |
| 257 | 257 | Craft::error( |
| 258 | - 'Error submitting sitemap index to: ' . $submissionUrl . ' - ' . $e->getMessage(), |
|
| 258 | + 'Error submitting sitemap index to: '.$submissionUrl.' - '.$e->getMessage(), |
|
| 259 | 259 | __METHOD__ |
| 260 | 260 | ); |
| 261 | 261 | } |
@@ -315,19 +315,19 @@ discard block |
||
| 315 | 315 | foreach ($searchEngineUrls as &$url) { |
| 316 | 316 | $sitemapUrl = $this->sitemapUrlForBundle($sourceBundleType, $sourceHandle, $sourceSiteId); |
| 317 | 317 | if (!empty($sitemapUrl)) { |
| 318 | - $submissionUrl = $url . urlencode($sitemapUrl); |
|
| 318 | + $submissionUrl = $url.urlencode($sitemapUrl); |
|
| 319 | 319 | // create new guzzle client |
| 320 | 320 | $guzzleClient = Craft::createGuzzleClient(['timeout' => 5, 'connect_timeout' => 5]); |
| 321 | 321 | // Submit the sitemap index to each search engine |
| 322 | 322 | try { |
| 323 | 323 | $guzzleClient->post($submissionUrl); |
| 324 | 324 | Craft::info( |
| 325 | - 'Sitemap index submitted to: ' . $submissionUrl, |
|
| 325 | + 'Sitemap index submitted to: '.$submissionUrl, |
|
| 326 | 326 | __METHOD__ |
| 327 | 327 | ); |
| 328 | 328 | } catch (\Exception $e) { |
| 329 | 329 | Craft::error( |
| 330 | - 'Error submitting sitemap index to: ' . $submissionUrl . ' - ' . $e->getMessage(), |
|
| 330 | + 'Error submitting sitemap index to: '.$submissionUrl.' - '.$e->getMessage(), |
|
| 331 | 331 | __METHOD__ |
| 332 | 332 | ); |
| 333 | 333 | } |
@@ -393,19 +393,19 @@ discard block |
||
| 393 | 393 | foreach ($searchEngineUrls as &$url) { |
| 394 | 394 | $sitemapUrl = $this->sitemapCustomUrlForSiteId($siteId); |
| 395 | 395 | if (!empty($sitemapUrl)) { |
| 396 | - $submissionUrl = $url . urlencode($sitemapUrl); |
|
| 396 | + $submissionUrl = $url.urlencode($sitemapUrl); |
|
| 397 | 397 | // create new guzzle client |
| 398 | 398 | $guzzleClient = Craft::createGuzzleClient(['timeout' => 5, 'connect_timeout' => 5]); |
| 399 | 399 | // Submit the sitemap index to each search engine |
| 400 | 400 | try { |
| 401 | 401 | $guzzleClient->post($submissionUrl); |
| 402 | 402 | Craft::info( |
| 403 | - 'Sitemap Custom submitted to: ' . $submissionUrl, |
|
| 403 | + 'Sitemap Custom submitted to: '.$submissionUrl, |
|
| 404 | 404 | __METHOD__ |
| 405 | 405 | ); |
| 406 | 406 | } catch (\Exception $e) { |
| 407 | 407 | Craft::error( |
| 408 | - 'Error submitting sitemap index to: ' . $submissionUrl . ' - ' . $e->getMessage(), |
|
| 408 | + 'Error submitting sitemap index to: '.$submissionUrl.' - '.$e->getMessage(), |
|
| 409 | 409 | __METHOD__ |
| 410 | 410 | ); |
| 411 | 411 | } |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | } |
| 484 | 484 | |
| 485 | 485 | foreach ($sites as $site) { |
| 486 | - $result .= 'sitemap: ' . $this->sitemapIndexUrlForSiteId($site->id) . PHP_EOL; |
|
| 486 | + $result .= 'sitemap: '.$this->sitemapIndexUrlForSiteId($site->id).PHP_EOL; |
|
| 487 | 487 | } |
| 488 | 488 | |
| 489 | 489 | return rtrim($result, PHP_EOL); |
@@ -515,9 +515,9 @@ discard block |
||
| 515 | 515 | // Since we want a stale-while-revalidate pattern, only invalidate the cache if we're asked to |
| 516 | 516 | if ($invalidateCache) { |
| 517 | 517 | $cache = Craft::$app->getCache(); |
| 518 | - TagDependency::invalidate($cache, SitemapTemplate::SITEMAP_CACHE_TAG . $handle . $siteId); |
|
| 518 | + TagDependency::invalidate($cache, SitemapTemplate::SITEMAP_CACHE_TAG.$handle.$siteId); |
|
| 519 | 519 | Craft::info( |
| 520 | - 'Sitemap cache cleared: ' . $handle, |
|
| 520 | + 'Sitemap cache cleared: '.$handle, |
|
| 521 | 521 | __METHOD__ |
| 522 | 522 | ); |
| 523 | 523 | } |
@@ -44,12 +44,12 @@ discard block |
||
| 44 | 44 | $siteUrl = MetaValue::parseString($siteUrl); |
| 45 | 45 | // Extract out just the path part |
| 46 | 46 | $parts = self::decomposeUrl($path); |
| 47 | - $path = $parts['path'] . $parts['suffix']; |
|
| 48 | - $url = rtrim($siteUrl, '/') . '/' . ltrim($path, '/'); |
|
| 47 | + $path = $parts['path'].$parts['suffix']; |
|
| 48 | + $url = rtrim($siteUrl, '/').'/'.ltrim($path, '/'); |
|
| 49 | 49 | // Handle trailing slashes properly for generated URLs |
| 50 | 50 | $generalConfig = Craft::$app->getConfig()->getGeneral(); |
| 51 | 51 | if ($generalConfig->addTrailingSlashesToUrls && !preg_match('/\.[^\/]+$/', $url)) { |
| 52 | - $url = rtrim($url, '/') . '/'; |
|
| 52 | + $url = rtrim($url, '/').'/'; |
|
| 53 | 53 | } |
| 54 | 54 | if (!$generalConfig->addTrailingSlashesToUrls) { |
| 55 | 55 | $url = rtrim($url, '/'); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | // Handle trailing slashes properly for generated URLs |
| 127 | 127 | $generalConfig = Craft::$app->getConfig()->getGeneral(); |
| 128 | 128 | if ($generalConfig->addTrailingSlashesToUrls && !preg_match('/\.[^\/]+$/', $url)) { |
| 129 | - $url = rtrim($url, '/') . '/'; |
|
| 129 | + $url = rtrim($url, '/').'/'; |
|
| 130 | 130 | } |
| 131 | 131 | if (!$generalConfig->addTrailingSlashesToUrls) { |
| 132 | 132 | $url = rtrim($url, '/'); |
@@ -146,13 +146,13 @@ discard block |
||
| 146 | 146 | $urlParts = parse_url($url); |
| 147 | 147 | $encodedUrl = ""; |
| 148 | 148 | if (isset($urlParts['scheme'])) { |
| 149 | - $encodedUrl .= $urlParts['scheme'] . '://'; |
|
| 149 | + $encodedUrl .= $urlParts['scheme'].'://'; |
|
| 150 | 150 | } |
| 151 | 151 | if (isset($urlParts['host'])) { |
| 152 | 152 | $encodedUrl .= $urlParts['host']; |
| 153 | 153 | } |
| 154 | 154 | if (isset($urlParts['port'])) { |
| 155 | - $encodedUrl .= ':' . $urlParts['port']; |
|
| 155 | + $encodedUrl .= ':'.$urlParts['port']; |
|
| 156 | 156 | } |
| 157 | 157 | if (isset($urlParts['path'])) { |
| 158 | 158 | $encodedUrl .= $urlParts['path']; |
@@ -162,15 +162,15 @@ discard block |
||
| 162 | 162 | foreach ($query as $j => $value) { |
| 163 | 163 | $value = explode('=', $value, 2); |
| 164 | 164 | if (count($value) === 2) { |
| 165 | - $query[$j] = urlencode($value[0]) . '=' . urlencode($value[1]); |
|
| 165 | + $query[$j] = urlencode($value[0]).'='.urlencode($value[1]); |
|
| 166 | 166 | } else { |
| 167 | 167 | $query[$j] = urlencode($value[0]); |
| 168 | 168 | } |
| 169 | 169 | } |
| 170 | - $encodedUrl .= '?' . implode('&', $query); |
|
| 170 | + $encodedUrl .= '?'.implode('&', $query); |
|
| 171 | 171 | } |
| 172 | 172 | if (isset($urlParts['fragment'])) { |
| 173 | - $encodedUrl .= '#' . $urlParts['fragment']; |
|
| 173 | + $encodedUrl .= '#'.$urlParts['fragment']; |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | return $encodedUrl; |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | if ($siteId !== null) { |
| 211 | 211 | $site = $sites->getSiteById($siteId, true); |
| 212 | 212 | if (!$site) { |
| 213 | - throw new Exception('Invalid site ID: ' . $siteId); |
|
| 213 | + throw new Exception('Invalid site ID: '.$siteId); |
|
| 214 | 214 | } |
| 215 | 215 | } |
| 216 | 216 | |
@@ -236,11 +236,11 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | if (filter_var($pathOrUrl, FILTER_VALIDATE_URL)) { |
| 238 | 238 | $url_parts = parse_url($pathOrUrl); |
| 239 | - $result['prefix'] = $url_parts['scheme'] . '://' . $url_parts['host']; |
|
| 239 | + $result['prefix'] = $url_parts['scheme'].'://'.$url_parts['host']; |
|
| 240 | 240 | $result['path'] = $url_parts['path'] ?? ''; |
| 241 | 241 | $result['suffix'] = ''; |
| 242 | - $result['suffix'] .= empty($url_parts['query']) ? '' : '?' . $url_parts['query']; |
|
| 243 | - $result['suffix'] .= empty($url_parts['fragment']) ? '' : '#' . $url_parts['fragment']; |
|
| 242 | + $result['suffix'] .= empty($url_parts['query']) ? '' : '?'.$url_parts['query']; |
|
| 243 | + $result['suffix'] .= empty($url_parts['fragment']) ? '' : '#'.$url_parts['fragment']; |
|
| 244 | 244 | } else { |
| 245 | 245 | $result['prefix'] = ''; |
| 246 | 246 | $result['path'] = $pathOrUrl; |