Passed
Push — develop ( e8507c...62709e )
by Andrew
04:10
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   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     {
86 86
         $result = self::getFile($path);
87 87
         if ($result) {
88
-            $result = "<style>\r\n" . $result . "</style>\r\n";
88
+            $result = "<style>\r\n".$result."</style>\r\n";
89 89
 
90 90
             return $result;
91 91
         }
@@ -113,12 +113,12 @@  discard block
 block discarded – undo
113 113
                 $dirPrefix = CRAFT_TEMPLATES_PATH;
114 114
             }
115 115
             $name = strstr($name, $dirPrefix);
116
-            $name = (string)str_replace($dirPrefix, '', $name);
116
+            $name = (string) str_replace($dirPrefix, '', $name);
117 117
             $path = self::combinePaths(
118 118
                     $config['localFiles']['basePath'],
119 119
                     $config['localFiles']['criticalPrefix'],
120 120
                     $name
121
-                ) . $config['localFiles']['criticalSuffix'];
121
+                ).$config['localFiles']['criticalSuffix'];
122 122
 
123 123
             return self::getCssInlineTags($path);
124 124
         }
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
         $dependency = new TagDependency([
506 506
             'tags' => [
507 507
                 self::CACHE_TAG,
508
-                self::CACHE_TAG . $path,
508
+                self::CACHE_TAG.$path,
509 509
             ],
510 510
         ]);
511 511
         // Set the cache duration based on devMode
@@ -521,8 +521,8 @@  discard block
 block discarded – undo
521 521
         $settings = Twigpack::$plugin->getSettings();
522 522
         $cacheKeySuffix = $settings->cacheKeySuffix ?? '';
523 523
         $file = $cache->getOrSet(
524
-            self::CACHE_KEY . $cacheKeySuffix . $path,
525
-            function () use ($path, $callback) {
524
+            self::CACHE_KEY.$cacheKeySuffix.$path,
525
+            function() use ($path, $callback) {
526 526
                 $result = null;
527 527
                 if (UrlHelper::isAbsoluteUrl($path)) {
528 528
                     /**
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
     protected static function combinePaths(string ...$paths): string
573 573
     {
574 574
         $last_key = count($paths) - 1;
575
-        array_walk($paths, function (&$val, $key) use ($last_key) {
575
+        array_walk($paths, function(&$val, $key) use ($last_key) {
576 576
             switch ($key) {
577 577
                 case 0:
578 578
                     $val = rtrim($val, '/ ');
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
     {
627 627
         $json = JsonHelper::decodeIfJson($string);
628 628
         if (is_string($json)) {
629
-            Craft::error('Error decoding JSON file: ' . $json, __METHOD__);
629
+            Craft::error('Error decoding JSON file: '.$json, __METHOD__);
630 630
             $json = null;
631 631
         }
632 632
 
Please login to merge, or discard this patch.