Passed
Push — develop ( dfd844...8978e1 )
by Andrew
11:01
created
src/Twigpack.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         Event::on(
108 108
             View::class,
109 109
             View::EVENT_BEFORE_RENDER_PAGE_TEMPLATE,
110
-            function (TemplateEvent $event) {
110
+            function(TemplateEvent $event) {
111 111
                 self::$templateName = $event->template;
112 112
             }
113 113
         );
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         Event::on(
116 116
             CraftVariable::class,
117 117
             CraftVariable::EVENT_INIT,
118
-            function (Event $event) {
118
+            function(Event $event) {
119 119
                 /** @var CraftVariable $variable */
120 120
                 $variable = $event->sender;
121 121
                 $variable->set('twigpack', ManifestVariable::class);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         Event::on(
126 126
             TemplateCaches::class,
127 127
             TemplateCaches::EVENT_AFTER_DELETE_CACHES,
128
-            function (DeleteTemplateCachesEvent $event) {
128
+            function(DeleteTemplateCachesEvent $event) {
129 129
                 // Invalidate the caches when template caches are deleted
130 130
                 $this->clearAllCaches();
131 131
             }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         Event::on(
135 135
             Plugins::class,
136 136
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
137
-            function (PluginEvent $event) {
137
+            function(PluginEvent $event) {
138 138
                 if ($event->plugin === $this) {
139 139
                     // Invalidate our caches after we've been installed
140 140
                     $this->clearAllCaches();
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         Event::on(
146 146
             ClearCaches::class,
147 147
             ClearCaches::EVENT_REGISTER_CACHE_OPTIONS,
148
-            function (RegisterCacheOptionsEvent $event) {
148
+            function(RegisterCacheOptionsEvent $event) {
149 149
                 Craft::debug(
150 150
                     'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS',
151 151
                     __METHOD__
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         // delay attaching event handler to the view component after it is fully configured
161 161
         $app = Craft::$app;
162 162
         if ($app->getConfig()->getGeneral()->devMode) {
163
-            $app->on(Application::EVENT_BEFORE_REQUEST, function () use ($app) {
163
+            $app->on(Application::EVENT_BEFORE_REQUEST, function() use ($app) {
164 164
                 $app->getView()->on(View::EVENT_END_BODY, [$this, 'injectErrorEntry']);
165 165
             });
166 166
         }
Please login to merge, or discard this patch.
src/config.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         'errorEntry' => '',
33 33
         // String to be appended to the cache key
34 34
         'cacheKeySuffix' => '',
35
-       // Manifest file names
35
+        // Manifest file names
36 36
         'manifest' => [
37 37
             'legacy' => 'manifest-legacy.json',
38 38
             'modern' => 'manifest.json',
Please login to merge, or discard this patch.
src/helpers/Manifest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
                 $dirPrefix = CRAFT_TEMPLATES_PATH;
142 142
             }
143 143
             $name = strstr($name, $dirPrefix);
144
-            $name = (string)str_replace($dirPrefix, '', $name);
144
+            $name = (string) str_replace($dirPrefix, '', $name);
145 145
             $path = self::combinePaths(
146 146
                     $config['localFiles']['basePath'],
147 147
                     $config['localFiles']['criticalPrefix'],
148 148
                     $name
149
-                ) . $config['localFiles']['criticalSuffix'];
149
+                ).$config['localFiles']['criticalSuffix'];
150 150
 
151 151
             return self::getCssInlineTags($path, $attributes);
152 152
         }
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
         $dependency = new TagDependency([
547 547
             'tags' => [
548 548
                 self::CACHE_TAG,
549
-                self::CACHE_TAG . $path,
549
+                self::CACHE_TAG.$path,
550 550
             ],
551 551
         ]);
552 552
         // Set the cache duration based on devMode
@@ -562,8 +562,8 @@  discard block
 block discarded – undo
562 562
         $settings = Twigpack::$plugin->getSettings();
563 563
         $cacheKeySuffix = $settings->cacheKeySuffix ?? '';
564 564
         $file = $cache->getOrSet(
565
-            self::CACHE_KEY . $cacheKeySuffix . $path,
566
-            function () use ($path, $callback) {
565
+            self::CACHE_KEY.$cacheKeySuffix.$path,
566
+            function() use ($path, $callback) {
567 567
                 $result = null;
568 568
                 if (UrlHelper::isAbsoluteUrl($path)) {
569 569
                     /**
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
     protected static function combinePaths(string ...$paths): string
614 614
     {
615 615
         $last_key = count($paths) - 1;
616
-        array_walk($paths, function (&$val, $key) use ($last_key) {
616
+        array_walk($paths, function(&$val, $key) use ($last_key) {
617 617
             switch ($key) {
618 618
                 case 0:
619 619
                     $val = rtrim($val, '/ ');
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
         $cspNonceType = self::getCspNonceType();
668 668
         if ($cspNonceType) {
669 669
             $cspValue = "{$cspDirective} 'nonce-$nonce'";
670
-            foreach(self::CSP_HEADERS as $cspHeader) {
670
+            foreach (self::CSP_HEADERS as $cspHeader) {
671 671
                 switch ($cspNonceType) {
672 672
                     case 'tag':
673 673
                         Craft::$app->getView()->registerMetaTag([
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
                         ]);
677 677
                         break;
678 678
                     case 'header':
679
-                        Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue . ';');
679
+                        Craft::$app->getResponse()->getHeaders()->add($cspHeader, $cspValue.';');
680 680
                         break;
681 681
                     default:
682 682
                         break;
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
     {
723 723
         $json = JsonHelper::decodeIfJson($string);
724 724
         if (is_string($json)) {
725
-            Craft::error('Error decoding JSON file: ' . $json, __METHOD__);
725
+            Craft::error('Error decoding JSON file: '.$json, __METHOD__);
726 726
             $json = null;
727 727
         }
728 728
 
Please login to merge, or discard this patch.