Passed
Push — develop ( 49c46c...91cf7b )
by Andrew
04:16
created
src/controllers/StatisticsController.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     // Protected Properties
41 41
     // =========================================================================
42 42
 
43
-    protected $allowAnonymous = [];
43
+    protected $allowAnonymous = [ ];
44 44
 
45 45
     // Public Methods
46 46
     // =========================================================================
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function actionDashboard(string $siteHandle = null, bool $showWelcome = false): Response
58 58
     {
59
-        $variables = [];
59
+        $variables = [ ];
60 60
         PermissionHelper::controllerPermissionCheck('retour:dashboard');
61 61
         // Trim the statistics
62 62
         Retour::$plugin->statistics->trimStatistics();
@@ -71,20 +71,20 @@  discard block
 block discarded – undo
71 71
         } catch (InvalidConfigException $e) {
72 72
             Craft::error($e->getMessage(), __METHOD__);
73 73
         }
74
-        $variables['baseAssetsUrl'] = Craft::$app->assetManager->getPublishedUrl(
74
+        $variables[ 'baseAssetsUrl' ] = Craft::$app->assetManager->getPublishedUrl(
75 75
             '@nystudio107/retour/assetbundles/retour/dist',
76 76
             true
77 77
         );
78 78
         // Enabled sites
79 79
         MultiSiteHelper::setMultiSiteVariables($siteHandle, $siteId, $variables);
80
-        $variables['controllerHandle'] = 'statistics';
80
+        $variables[ 'controllerHandle' ] = 'statistics';
81 81
 
82 82
         // Basic variables
83
-        $variables['fullPageForm'] = false;
84
-        $variables['docsUrl'] = self::DOCUMENTATION_URL;
85
-        $variables['pluginName'] = $pluginName;
86
-        $variables['title'] = $templateTitle;
87
-        $variables['crumbs'] = [
83
+        $variables[ 'fullPageForm' ] = false;
84
+        $variables[ 'docsUrl' ] = self::DOCUMENTATION_URL;
85
+        $variables[ 'pluginName' ] = $pluginName;
86
+        $variables[ 'title' ] = $templateTitle;
87
+        $variables[ 'crumbs' ] = [
88 88
             [
89 89
                 'label' => $pluginName,
90 90
                 'url' => UrlHelper::cpUrl('retour'),
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
                 'url' => UrlHelper::cpUrl('retour/dashboard'),
95 95
             ],
96 96
         ];
97
-        $variables['docTitle'] = "{$pluginName} - {$templateTitle}";
98
-        $variables['selectedSubnavItem'] = 'dashboard';
99
-        $variables['showWelcome'] = $showWelcome;
97
+        $variables[ 'docTitle' ] = "{$pluginName} - {$templateTitle}";
98
+        $variables[ 'selectedSubnavItem' ] = 'dashboard';
99
+        $variables[ 'showWelcome' ] = $showWelcome;
100 100
 
101 101
         // Render the template
102 102
         return $this->renderTemplate('retour/dashboard/index', $variables);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             Craft::t(
115 115
                 'retour',
116 116
                 'Retour statistics cleared: {error}',
117
-                ['error' => $error]
117
+                [ 'error' => $error ]
118 118
             ),
119 119
             __METHOD__
120 120
         );
Please login to merge, or discard this patch.