Passed
Branch v3 (0acaf5)
by Andrew
11:40
created
src/seoelements/SeoCategory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
src/gql/queries/SeomaticQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
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
         ];
Please login to merge, or discard this patch.
src/gql/types/generators/SeomaticGenerator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,17 +41,17 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/seoelements/SeoDigitalProduct.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
src/seomatic-config/digitalproductmeta/ScriptContainer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
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
         ],
Please login to merge, or discard this patch.
src/seomatic-config/digitalproductmeta/LinkContainer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
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
         ],
Please login to merge, or discard this patch.
src/seomatic-config/digitalproductmeta/TagContainer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         ],
Please login to merge, or discard this patch.
src/controllers/ContentSeoController.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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));
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@
 block discarded – undo
66 66
         string $sort = 'sourceName|asc',
67 67
         int    $page = 1,
68 68
         int    $per_page = 20,
69
-               $filter = '',
70
-               $siteId = 0
69
+                $filter = '',
70
+                $siteId = 0
71 71
     ): Response
72 72
     {
73 73
         $data = [];
Please login to merge, or discard this patch.
src/base/NonceContainer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
             $serializedNonces = implode(" ", $cspNonces);
72 72
             $cspDirective = self::CSP_DIRECTIVE;
73 73
             $cspValue = "{$cspDirective} {$serializedNonces};";
74
-            foreach(self::CSP_HEADERS as $cspHeader) {
74
+            foreach (self::CSP_HEADERS as $cspHeader) {
75 75
                 Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue);
76 76
             }
77 77
         }
Please login to merge, or discard this patch.