Passed
Push — develop ( a33116...4d0d15 )
by Andrew
03:38
created
src/migrations/Install.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         return true;
52 52
     }
53 53
 
54
-   /**
54
+    /**
55 55
      * @inheritdoc
56 56
      */
57 57
     public function safeDown()
Please login to merge, or discard this patch.
src/Webperf.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         Event::on(
152 152
             Plugins::class,
153 153
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
154
-            function (PluginEvent $event) {
154
+            function(PluginEvent $event) {
155 155
                 if ($event->plugin === $this) {
156 156
                     // Invalidate our caches after we've been installed
157 157
                     $this->clearAllCaches();
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         Event::on(
180 180
             CraftVariable::class,
181 181
             CraftVariable::EVENT_INIT,
182
-            function (Event $event) {
182
+            function(Event $event) {
183 183
                 /** @var CraftVariable $variable */
184 184
                 $variable = $event->sender;
185 185
                 $variable->set('webperf', WebperfVariable::class);
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         Event::on(
190 190
             Plugins::class,
191 191
             Plugins::EVENT_AFTER_LOAD_PLUGINS,
192
-            function () {
192
+            function() {
193 193
                 // Install these only after all other plugins have loaded
194 194
                 $request = Craft::$app->getRequest();
195 195
                 // Only respond to non-console site requests
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
         Event::on(
214 214
             UrlManager::class,
215 215
             UrlManager::EVENT_REGISTER_SITE_URL_RULES,
216
-            function (RegisterUrlRulesEvent $event) {
216
+            function(RegisterUrlRulesEvent $event) {
217 217
                 Craft::debug(
218 218
                     'UrlManager::EVENT_REGISTER_SITE_URL_RULES',
219 219
                     __METHOD__
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         Event::on(
237 237
             UrlManager::class,
238 238
             UrlManager::EVENT_REGISTER_CP_URL_RULES,
239
-            function (RegisterUrlRulesEvent $event) {
239
+            function(RegisterUrlRulesEvent $event) {
240 240
                 Craft::debug(
241 241
                     'UrlManager::EVENT_REGISTER_CP_URL_RULES',
242 242
                     __METHOD__
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
         Event::on(
253 253
             Dashboard::class,
254 254
             Dashboard::EVENT_REGISTER_WIDGET_TYPES,
255
-            function (RegisterComponentTypesEvent $event) {
255
+            function(RegisterComponentTypesEvent $event) {
256 256
                 $event->types[] = MetricsWidget::class;
257 257
             }
258 258
         );
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         Event::on(
261 261
             UserPermissions::class,
262 262
             UserPermissions::EVENT_REGISTER_PERMISSIONS,
263
-            function (RegisterUserPermissionsEvent $event) {
263
+            function(RegisterUserPermissionsEvent $event) {
264 264
                 Craft::debug(
265 265
                     'UserPermissions::EVENT_REGISTER_PERMISSIONS',
266 266
                     __METHOD__
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             Event::on(
286 286
                 View::class,
287 287
                 View::EVENT_END_PAGE,
288
-                function () {
288
+                function() {
289 289
                     Craft::debug(
290 290
                         'View::EVENT_END_PAGE',
291 291
                         __METHOD__
Please login to merge, or discard this patch.
src/variables/ManifestVariable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         self::$config['server']['publicPath'] = $baseAssetsUrl;
52 52
         $useDevServer = getenv('NYS_PLUGIN_DEVSERVER');
53 53
         if ($useDevServer !== false) {
54
-            self::$config['useDevServer'] = (bool)$useDevServer;
54
+            self::$config['useDevServer'] = (bool) $useDevServer;
55 55
         }
56 56
     }
57 57
 
Please login to merge, or discard this patch.
src/helpers/MultiSite.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             } else {
113 113
                 $variables['sitesMenuLabel'] = Craft::t(
114 114
                     'site',
115
-                    $sites->getSiteById((int)$variables['currentSiteId'])->name
115
+                    $sites->getSiteById((int) $variables['currentSiteId'])->name
116 116
                 );
117 117
             }
118 118
         } else {
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
             }
173 173
 
174 174
             if (($parsed = parse_url($site->getBaseUrl())) === false) {
175
-                Craft::warning('Unable to parse the site base URL: ' . $site->baseUrl);
175
+                Craft::warning('Unable to parse the site base URL: '.$site->baseUrl);
176 176
                 continue;
177 177
             }
178 178
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
             // Does the site URL specify a base path?
185 185
             $parsedPath = !empty($parsed['path']) ? self::normalizePath($parsed['path']) : '';
186
-            if ($parsedPath && strpos($fullUri . '/', $parsedPath . '/') !== 0) {
186
+            if ($parsedPath && strpos($fullUri.'/', $parsedPath.'/') !== 0) {
187 187
                 continue;
188 188
             }
189 189
 
Please login to merge, or discard this patch.
src/helpers/PluginTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 
64 64
         // Render the template with our vars passed in
65 65
         try {
66
-            $htmlText = Craft::$app->view->renderTemplate('webperf/' . $templatePath, $params);
66
+            $htmlText = Craft::$app->view->renderTemplate('webperf/'.$templatePath, $params);
67 67
             $templateRendered = true;
68 68
         } catch (\Exception $e) {
69 69
             $htmlText = Craft::t(
Please login to merge, or discard this patch.
src/helpers/Manifest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
         $cache = Craft::$app->getCache();
406 406
         $file = $cache->getOrSet(
407 407
             self::CACHE_KEY.$path,
408
-            function () use ($path, $callback) {
408
+            function() use ($path, $callback) {
409 409
                 $result = null;
410 410
                 $contents = @file_get_contents($path);
411 411
                 if ($contents) {
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
     protected static function combinePaths(string ...$paths): string
436 436
     {
437 437
         $last_key = \count($paths) - 1;
438
-        array_walk($paths, function (&$val, $key) use ($last_key) {
438
+        array_walk($paths, function(&$val, $key) use ($last_key) {
439 439
             switch ($key) {
440 440
                 case 0:
441 441
                     $val = rtrim($val, '/ ');
Please login to merge, or discard this patch.
src/controllers/ChartsController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                     'COUNT(handledByRetour = 1 or null) as handled_cnt',
81 81
                 ])
82 82
                 ->where("hitLastTime >= ( CURDATE() - INTERVAL '{$days}' DAY )");
83
-            if ((int)$siteId !== 0) {
83
+            if ((int) $siteId !== 0) {
84 84
                 $query->andWhere(['siteId' => $siteId]);
85 85
             }
86 86
             $query
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                     "COUNT(CASE WHEN \"handledByRetour\" = true THEN 1 END) as handled_cnt",
99 99
                 ])
100 100
                 ->where("\"hitLastTime\" >= ( CURRENT_TIMESTAMP - INTERVAL '{$days} days' )");
101
-            if ((int)$siteId !== 0) {
101
+            if ((int) $siteId !== 0) {
102 102
                 $query->andWhere(['siteId' => $siteId]);
103 103
             }
104 104
             $query
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
         }
163 163
         if ($stats) {
164 164
             $data = [
165
-                (int)$stats,
166
-                (int)$handledStats,
165
+                (int) $stats,
166
+                (int) $handledStats,
167 167
             ];
168 168
         }
169 169
 
Please login to merge, or discard this patch.
src/controllers/TablesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             ->offset($offset)
80 80
             ->limit($per_page)
81 81
             ->orderBy("{$sortField} {$sortType}");
82
-        if ((int)$siteId !== 0) {
82
+        if ((int) $siteId !== 0) {
83 83
             $query->where(['siteId' => $siteId]);
84 84
         }
85 85
         if ($filter !== '') {
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             ->offset($offset)
161 161
             ->limit($per_page)
162 162
             ->orderBy("{$sortField} {$sortType}");
163
-        if ((int)$siteId !== 0) {
163
+        if ((int) $siteId !== 0) {
164 164
             $query->where(['siteId' => $siteId]);
165 165
         }
166 166
         if ($filter !== '') {
Please login to merge, or discard this patch.
src/controllers/MetricsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 namespace {
12 12
 
13
-    require_once __DIR__ . '/../lib/geoiploc.php';
13
+    require_once __DIR__.'/../lib/geoiploc.php';
14 14
 }
15 15
 
16 16
 namespace nystudio107\webperf\controllers {
Please login to merge, or discard this patch.