Passed
Push — develop ( c01497...045f37 )
by Andrew
06:11
created
src/RichVariables.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         Event::on(
84 84
             CraftVariable::class,
85 85
             CraftVariable::EVENT_INIT,
86
-            function (Event $event) {
86
+            function(Event $event) {
87 87
                 /** @var CraftVariable $variable */
88 88
                 $variable = $event->sender;
89 89
                 $variable->set('richVariables', RichVariablesVariable::class);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         Event::on(
94 94
             Plugins::class,
95 95
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
96
-            function (PluginEvent $event) {
96
+            function(PluginEvent $event) {
97 97
                 if ($event->plugin === $this) {
98 98
                     $request = Craft::$app->getRequest();
99 99
                     if ($request->isCpRequest) {
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         Event::on(
123 123
             UrlManager::class,
124 124
             UrlManager::EVENT_REGISTER_SITE_URL_RULES,
125
-            function (RegisterUrlRulesEvent $event) {
125
+            function(RegisterUrlRulesEvent $event) {
126 126
                 Craft::debug(
127 127
                     'UrlManager::EVENT_REGISTER_SITE_URL_RULES',
128 128
                     __METHOD__
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         Event::on(
146 146
             Plugins::class,
147 147
             Plugins::EVENT_AFTER_LOAD_PLUGINS,
148
-            function () {
148
+            function() {
149 149
                 $this->installRedactorPlugin();
150 150
             }
151 151
         );
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             Event::on(
177 177
                 RichText::class,
178 178
                 RichText::EVENT_REGISTER_PLUGIN_PATHS,
179
-                function (RegisterPluginPathsEvent $event) {
179
+                function(RegisterPluginPathsEvent $event) {
180 180
                     /** @var Plugin $redactor */
181 181
                     $redactor = Craft::$app->getPlugins()->getPlugin('redactor');
182 182
                     $versionDir = 'v1/';
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
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 
35 35
     const ASSET_CLASS = RichVariablesAsset::class;
36 36
 
37
-    const CACHE_KEY = 'twigpack-' . self::ASSET_CLASS;
38
-    const CACHE_TAG = 'twigpack-' . self::ASSET_CLASS;
37
+    const CACHE_KEY = 'twigpack-'.self::ASSET_CLASS;
38
+    const CACHE_TAG = 'twigpack-'.self::ASSET_CLASS;
39 39
 
40 40
     const DEVMODE_CACHE_DURATION = 1;
41 41
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         self::$config['server']['publicPath'] = $baseAssetsUrl;
103 103
         $useDevServer = getenv('NYS_PLUGIN_DEVSERVER');
104 104
         if ($useDevServer !== false) {
105
-            self::$config['useDevServer'] = (bool)$useDevServer;
105
+            self::$config['useDevServer'] = (bool) $useDevServer;
106 106
         }
107 107
     }
108 108
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     public static function registerJsModules(array $modules)
117 117
     {
118 118
         $view = Craft::$app->getView();
119
-        foreach($modules as $module) {
119
+        foreach ($modules as $module) {
120 120
             $jsModule = self::getModule(self::$config, $module, 'modern');
121 121
             if ($jsModule) {
122 122
                 $view->registerJsFile($jsModule, [
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     public static function registerCssModules(array $modules)
137 137
     {
138 138
         $view = Craft::$app->getView();
139
-        foreach($modules as $module) {
139
+        foreach ($modules as $module) {
140 140
             $cssModule = self::getModule(self::$config, $module, 'legacy');
141 141
             if ($cssModule) {
142 142
                 $view->registerCssFile($cssModule, [
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
         // Resolve any aliases
364 364
         $alias = Craft::getAlias($path, false);
365 365
         if ($alias) {
366
-            $path = (string)$alias;
366
+            $path = (string) $alias;
367 367
         }
368 368
         // Make sure it's a full URL
369 369
         if (!UrlHelper::isAbsoluteUrl($path) && !is_file($path)) {
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
         $cache = Craft::$app->getCache();
407 407
         $file = $cache->getOrSet(
408 408
             self::CACHE_KEY.$path,
409
-            function () use ($path, $callback) {
409
+            function() use ($path, $callback) {
410 410
                 $result = null;
411 411
                 $contents = @file_get_contents($path);
412 412
                 if ($contents) {
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     protected static function combinePaths(string ...$paths): string
437 437
     {
438 438
         $last_key = count($paths) - 1;
439
-        array_walk($paths, function (&$val, $key) use ($last_key) {
439
+        array_walk($paths, function(&$val, $key) use ($last_key) {
440 440
             switch ($key) {
441 441
                 case 0:
442 442
                     $val = rtrim($val, '/ ');
Please login to merge, or discard this patch.