@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | Event::on( |
| 110 | 110 | Sections::class, |
| 111 | 111 | Sections::EVENT_AFTER_SAVE_SECTION, |
| 112 | - function (SectionEvent $event) { |
|
| 112 | + function(SectionEvent $event) { |
|
| 113 | 113 | Craft::debug( |
| 114 | 114 | 'Sections::EVENT_AFTER_SAVE_SECTION', |
| 115 | 115 | __METHOD__ |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | Event::on( |
| 133 | 133 | Sections::class, |
| 134 | 134 | Sections::EVENT_AFTER_DELETE_SECTION, |
| 135 | - function (SectionEvent $event) { |
|
| 135 | + function(SectionEvent $event) { |
|
| 136 | 136 | Craft::debug( |
| 137 | 137 | 'Sections::EVENT_AFTER_DELETE_SECTION', |
| 138 | 138 | __METHOD__ |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | // Install only for non-console Control Panel requests |
| 161 | 161 | if ($request->getIsCpRequest() && !$request->getIsConsoleRequest()) { |
| 162 | 162 | // Entries sidebar |
| 163 | - Seomatic::$view->hook('cp.entries.edit.details', function (&$context) { |
|
| 163 | + Seomatic::$view->hook('cp.entries.edit.details', function(&$context) { |
|
| 164 | 164 | $html = ''; |
| 165 | 165 | Seomatic::$view->registerAssetBundle(SeomaticAsset::class); |
| 166 | 166 | /** @var $entry Entry */ |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | ConfigHelper::getConfigFromFile(self::configFilePath()), |
| 343 | 343 | [ |
| 344 | 344 | 'sourceId' => $sourceModel->id, |
| 345 | - 'sourceName' => (string)$sourceModel->name, |
|
| 345 | + 'sourceName' => (string) $sourceModel->name, |
|
| 346 | 346 | 'sourceHandle' => $sourceModel->handle, |
| 347 | 347 | 'sourceType' => $sourceModel->type, |
| 348 | 348 | ] |
@@ -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__ |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | Event::on( |
| 130 | 130 | Categories::class, |
| 131 | 131 | Categories::EVENT_AFTER_DELETE_GROUP, |
| 132 | - function (CategoryGroupEvent $event) { |
|
| 132 | + function(CategoryGroupEvent $event) { |
|
| 133 | 133 | Craft::debug( |
| 134 | 134 | 'Categories::EVENT_AFTER_DELETE_GROUP', |
| 135 | 135 | __METHOD__ |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | // Install only for non-console Control Panel requests |
| 158 | 158 | if ($request->getIsCpRequest() && !$request->getIsConsoleRequest()) { |
| 159 | 159 | // Category Groups sidebar |
| 160 | - Seomatic::$view->hook('cp.categories.edit.details', function (&$context) { |
|
| 160 | + Seomatic::$view->hook('cp.categories.edit.details', function(&$context) { |
|
| 161 | 161 | $html = ''; |
| 162 | 162 | Seomatic::$view->registerAssetBundle(SeomaticAsset::class); |
| 163 | 163 | /** @var $category Category */ |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | ConfigHelper::getConfigFromFile(self::configFilePath()), |
| 341 | 341 | [ |
| 342 | 342 | 'sourceId' => $sourceModel->id, |
| 343 | - 'sourceName' => (string)$sourceModel->name, |
|
| 343 | + 'sourceName' => (string) $sourceModel->name, |
|
| 344 | 344 | 'sourceHandle' => $sourceModel->handle, |
| 345 | 345 | ] |
| 346 | 346 | ); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | 'seomatic' => [ |
| 36 | 36 | 'type' => SeomaticInterface::getType(), |
| 37 | 37 | 'args' => SeomaticArguments::getArguments(), |
| 38 | - 'resolve' => SeomaticResolver::class . '::resolve', |
|
| 38 | + 'resolve' => SeomaticResolver::class.'::resolve', |
|
| 39 | 39 | 'description' => 'This query is used to query for SEOmatic meta data.' |
| 40 | 40 | ], |
| 41 | 41 | ]; |
@@ -41,17 +41,17 @@ |
||
| 41 | 41 | $seomaticType = GqlEntityRegistry::getEntity($typeName) |
| 42 | 42 | ?: GqlEntityRegistry::createEntity($typeName, new SeomaticType([ |
| 43 | 43 | 'name' => $typeName, |
| 44 | - 'args' => function () use ($seomaticArgs) { |
|
| 44 | + 'args' => function() use ($seomaticArgs) { |
|
| 45 | 45 | return $seomaticArgs; |
| 46 | 46 | }, |
| 47 | - 'fields' => function () use ($seomaticFields) { |
|
| 47 | + 'fields' => function() use ($seomaticFields) { |
|
| 48 | 48 | return $seomaticFields; |
| 49 | 49 | }, |
| 50 | 50 | 'description' => 'This entity has all the SEOmatic fields', |
| 51 | 51 | ])); |
| 52 | 52 | |
| 53 | 53 | $gqlTypes[$typeName] = $seomaticType; |
| 54 | - TypeLoader::registerType($typeName, function () use ($seomaticType) { |
|
| 54 | + TypeLoader::registerType($typeName, function() use ($seomaticType) { |
|
| 55 | 55 | return $seomaticType; |
| 56 | 56 | }); |
| 57 | 57 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | ProductTypes::class, |
| 108 | 108 | ProductTypes::EVENT_AFTER_SAVE_PRODUCTTYPE, |
| 109 | 109 | /** @var ProductTypeEvent $event */ |
| 110 | - static function ($event) { |
|
| 110 | + static function($event) { |
|
| 111 | 111 | Craft::debug( |
| 112 | 112 | 'ProductTypes::EVENT_AFTER_SAVE_PRODUCTTYPE', |
| 113 | 113 | __METHOD__ |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | // Digital Product Types sidebar |
| 164 | 164 | $digitalProducts = DigitalProductsPlugin::getInstance(); |
| 165 | 165 | if ($digitalProducts !== null) { |
| 166 | - Seomatic::$view->hook('cp.digital-products.product.edit.details', static function (&$context) { |
|
| 166 | + Seomatic::$view->hook('cp.digital-products.product.edit.details', static function(&$context) { |
|
| 167 | 167 | $html = ''; |
| 168 | 168 | Seomatic::$view->registerAssetBundle(SeomaticAsset::class); |
| 169 | 169 | /** @var $product Product */ |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | ConfigHelper::getConfigFromFile(self::configFilePath()), |
| 373 | 373 | [ |
| 374 | 374 | 'sourceId' => $sourceModel->id, |
| 375 | - 'sourceName' => (string)$sourceModel->name, |
|
| 375 | + 'sourceName' => (string) $sourceModel->name, |
|
| 376 | 376 | 'sourceHandle' => $sourceModel->handle, |
| 377 | 377 | ] |
| 378 | 378 | ); |
@@ -24,7 +24,7 @@ |
||
| 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 | ], |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | 'name' => 'General', |
| 25 | 25 | 'description' => 'Link Tags', |
| 26 | 26 | 'handle' => LinkService::GENERAL_HANDLE, |
| 27 | - 'class' => (string)MetaLinkContainer::class, |
|
| 27 | + 'class' => (string) MetaLinkContainer::class, |
|
| 28 | 28 | 'include' => true, |
| 29 | 29 | 'dependencies' => [ |
| 30 | 30 | ], |
@@ -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 | ], |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | // Query the db table |
| 104 | 104 | $offset = ($page - 1) * $per_page; |
| 105 | 105 | $currentSiteHandle = ''; |
| 106 | - if ((int)$siteId !== 0) { |
|
| 106 | + if ((int) $siteId !== 0) { |
|
| 107 | 107 | $site = Craft::$app->getSites()->getSiteById($siteId); |
| 108 | 108 | if ($site !== null) { |
| 109 | 109 | $currentSiteHandle = $site->handle; |
@@ -158,11 +158,11 @@ discard block |
||
| 158 | 158 | $numGrades = \count(SettingsController::SETUP_GRADES); |
| 159 | 159 | $numFields = \count(SettingsController::SEO_SETUP_FIELDS); |
| 160 | 160 | foreach (SettingsController::SEO_SETUP_FIELDS as $setupField => $setupLabel) { |
| 161 | - $stat += (int)!empty($metaBundle->metaGlobalVars[$setupField]); |
|
| 161 | + $stat += (int) !empty($metaBundle->metaGlobalVars[$setupField]); |
|
| 162 | 162 | $value = $variables['contentSetupChecklist'][$setupField]['value'] ?? 0; |
| 163 | 163 | $variables['contentSetupChecklist'][$setupField] = [ |
| 164 | 164 | 'label' => $setupLabel, |
| 165 | - 'value' => $value + (int)!empty($metaBundle->metaGlobalVars[$setupField]), |
|
| 165 | + 'value' => $value + (int) !empty($metaBundle->metaGlobalVars[$setupField]), |
|
| 166 | 166 | ]; |
| 167 | 167 | } |
| 168 | 168 | $stat = round($numGrades - (($stat * $numGrades) / $numFields)); |