Passed
Push — develop ( 6607fa...55036c )
by Andrew
04:24
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   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -125,12 +125,12 @@  discard block
 block discarded – undo
125 125
                 $dirPrefix = CRAFT_TEMPLATES_PATH;
126 126
             }
127 127
             $name = strstr($name, $dirPrefix);
128
-            $name = (string)str_replace($dirPrefix, '', $name);
128
+            $name = (string) str_replace($dirPrefix, '', $name);
129 129
             $path = self::combinePaths(
130 130
                     $config['localFiles']['basePath'],
131 131
                     $config['localFiles']['criticalPrefix'],
132 132
                     $name
133
-                ) . $config['localFiles']['criticalSuffix'];
133
+                ).$config['localFiles']['criticalSuffix'];
134 134
 
135 135
             return self::getCssInlineTags($path);
136 136
         }
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
         $dependency = new TagDependency([
522 522
             'tags' => [
523 523
                 self::CACHE_TAG,
524
-                self::CACHE_TAG . $path,
524
+                self::CACHE_TAG.$path,
525 525
             ],
526 526
         ]);
527 527
         // Set the cache duration based on devMode
@@ -537,8 +537,8 @@  discard block
 block discarded – undo
537 537
         $settings = Twigpack::$plugin->getSettings();
538 538
         $cacheKeySuffix = $settings->cacheKeySuffix ?? '';
539 539
         $file = $cache->getOrSet(
540
-            self::CACHE_KEY . $cacheKeySuffix . $path,
541
-            function () use ($path, $callback) {
540
+            self::CACHE_KEY.$cacheKeySuffix.$path,
541
+            function() use ($path, $callback) {
542 542
                 $result = null;
543 543
                 if (UrlHelper::isAbsoluteUrl($path)) {
544 544
                     /**
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
     protected static function combinePaths(string ...$paths): string
589 589
     {
590 590
         $last_key = count($paths) - 1;
591
-        array_walk($paths, function (&$val, $key) use ($last_key) {
591
+        array_walk($paths, function(&$val, $key) use ($last_key) {
592 592
             switch ($key) {
593 593
                 case 0:
594 594
                     $val = rtrim($val, '/ ');
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
     {
643 643
         $json = JsonHelper::decodeIfJson($string);
644 644
         if (is_string($json)) {
645
-            Craft::error('Error decoding JSON file: ' . $json, __METHOD__);
645
+            Craft::error('Error decoding JSON file: '.$json, __METHOD__);
646 646
             $json = null;
647 647
         }
648 648
 
Please login to merge, or discard this patch.