Passed
Push — master ( 0017b2...5a58d2 )
by Hesham
02:57
created
src/config/lumener.php 2 patches
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -1,31 +1,31 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 return [
3
-  "name" => "Lumener",
4
-  "auto_login" => false,
5
-  "logout_cooldown" => 10,  // Time until auto login is enabled again (seconds)
6
-  // "logout_redirect" => "admin/dashboard",
7
-  "storage" => base_path('storage/lumener'),
3
+    "name" => "Lumener",
4
+    "auto_login" => false,
5
+    "logout_cooldown" => 10,  // Time until auto login is enabled again (seconds)
6
+    // "logout_redirect" => "admin/dashboard",
7
+    "storage" => base_path('storage/lumener'),
8 8
 
9
-  /**
10
-   *  Route
11
-   */
12
-   // For Lumen, a route that has ("as" => "lumener") will be automatically
13
-   // merged into main route
14
-  "route" =>
15
-  [
9
+    /**
10
+     *  Route
11
+     */
12
+    // For Lumen, a route that has ("as" => "lumener") will be automatically
13
+    // merged into main route
14
+    "route" =>
15
+    [
16 16
     // namespace is Lumener, cannot be overriden
17 17
     "path" => "lumener",
18 18
     "options" =>[
19
-      "as" => "lumener",
20
-      "uses" => 'LumenerController@index',
21
-      "middleware" => []
19
+        "as" => "lumener",
20
+        "uses" => 'LumenerController@index',
21
+        "middleware" => []
22 22
     ]
23
-  ],
23
+    ],
24 24
 
25
-  /**
26
-   * Adminer
27
-   */
28
-  "adminer" => [
25
+    /**
26
+     * Adminer
27
+     */
28
+    "adminer" => [
29 29
     // Check https://github.com/vrana/adminer/releases for custom releases
30 30
     // (e.g. adminer-{version}-mysql-en.php or editor-{version}.php)
31 31
     // This url format supports v4.2.5+
@@ -38,43 +38,43 @@  discard block
 block discarded – undo
38 38
     /**
39 39
      * Plugins
40 40
      */
41
-     "plugins" => [
41
+        "plugins" => [
42 42
         // plugin.php is required to use any plugin
43 43
         // Downloaded when no file/url is supplied to the lumener:plugin command
44 44
         "plugin_php" => "https://raw.github.com/vrana/adminer/master/plugins/plugin.php",
45 45
         // You must install the required plugins using the lumener:plugin command
46 46
         "enabled" => [
47
-          // No constructor arguments
48
-          // "AdminerDumpXml" => [],
49
-          // With constructor arguments
50
-          // "AdminerDatabaseHide" => [['information_schema', 'mysql']],
47
+            // No constructor arguments
48
+            // "AdminerDumpXml" => [],
49
+            // With constructor arguments
50
+            // "AdminerDatabaseHide" => [['information_schema', 'mysql']],
51
+        ],
51 52
         ],
52
-     ],
53 53
 
54
-     // "extension_file" => base_path("app/Logic/LumenerExtension.php")
55
-  ],
54
+        // "extension_file" => base_path("app/Logic/LumenerExtension.php")
55
+    ],
56 56
 
57
-  /**
58
-   * Security
59
-   */
60
-  // Uncomment any of the following lines to limit access by db/user
61
-  // Note that *_protected overrides *_allowed in conflicts
62
-  "security" => [
57
+    /**
58
+     * Security
59
+     */
60
+    // Uncomment any of the following lines to limit access by db/user
61
+    // Note that *_protected overrides *_allowed in conflicts
62
+    "security" => [
63 63
     // "allowed_db" => ['my_db'],
64 64
     // "protected_db" => ['information_schema', 'mysql'],
65 65
     // "allowed_users" => ['admin'],
66 66
     // "protected_users" => ['root']
67
-  ],
67
+    ],
68 68
 
69
-  /**
70
-   * Database Access Info (For Auto Login)
71
-   */
72
-  // Uncomment any of the following lines to override .env values
73
-  "db" => [
69
+    /**
70
+     * Database Access Info (For Auto Login)
71
+     */
72
+    // Uncomment any of the following lines to override .env values
73
+    "db" => [
74 74
     // "host" => "www.example.com",
75 75
     // "port" => 9999,
76 76
     // "username" => "root",
77 77
     // "password" => "toor",
78 78
     // "database" => "my_database"
79
-  ]
79
+    ]
80 80
 ];
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 return [
3 3
   "name" => "Lumener",
4 4
   "auto_login" => false,
5
-  "logout_cooldown" => 10,  // Time until auto login is enabled again (seconds)
5
+  "logout_cooldown" => 10, // Time until auto login is enabled again (seconds)
6 6
   // "logout_redirect" => "admin/dashboard",
7 7
   "storage" => base_path('storage/lumener'),
8 8
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     // This url format supports v4.2.5+
32 32
     "source" => "https://github.com/vrana/adminer/releases/download/v{version}/adminer-{version}.php",
33 33
     // These functions will be replaced by adminer_{name} to avoid conflicts
34
-    "rename_list" => ['redirect','cookie','view', 'exit', 'ob_flush'],
34
+    "rename_list" => ['redirect', 'cookie', 'view', 'exit', 'ob_flush'],
35 35
     // version can be exact (e.g. v4.7.1) if version_type is NOT "url"
36 36
     "version" => "https://api.github.com/repos/vrana/adminer/releases/latest",
37 37
     "version_type" => "url",
Please login to merge, or discard this patch.
src/logic/adminer_object.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
             return config('lumener.name', 'Lumener');
46 46
         }
47 47
 
48
-        public function permanentLogin($j=false)
48
+        public function permanentLogin($j = false)
49 49
         {
50 50
             // key used for permanent login
51 51
             $key = config('lumener.adminer_perma_key');
Please login to merge, or discard this patch.
src/console/PluginCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
             } else {
80 80
                 $this->error('Lumener: Could not retrieve plugin file. '
81 81
                 .
82
-                ($response ? "\r\n[{$response->getStatusCode()}] {$response->getReasonPhrase()} {(string)$response->getBody()}" : "Connection Failed.\r\n" . ShellHelper::$LastError));
82
+                ($response ? "\r\n[{$response->getStatusCode()}] {$response->getReasonPhrase()} {(string)$response->getBody()}" : "Connection Failed.\r\n".ShellHelper::$LastError));
83 83
                 return;
84 84
             }
85 85
         }
Please login to merge, or discard this patch.
src/console/StylizeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
             } else {
71 71
                 $this->error('Lumener: Could not retrieve theme file. '
72 72
                 .
73
-                ($response ? "\r\n[{$response->getStatusCode()}] {$response->getReasonPhrase()} {(string)$response->getBody()}" : "Connection Failed.\r\n" . ShellHelper::$LastError));
73
+                ($response ? "\r\n[{$response->getStatusCode()}] {$response->getReasonPhrase()} {(string)$response->getBody()}" : "Connection Failed.\r\n".ShellHelper::$LastError));
74 74
                 return;
75 75
             }
76 76
         } else {
Please login to merge, or discard this patch.
src/helpers/ShellHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      *
16 16
      * @return bool|mixed|\Psr\Http\Message\ResponseInterface
17 17
      */
18
-    public static function get($uri, $params=[])
18
+    public static function get($uri, $params = [])
19 19
     {
20 20
         try {
21 21
             $client = new Client(); //GuzzleHttp\Client
Please login to merge, or discard this patch.
src/controllers/LumenerController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function __call($method, $params)
32 32
     {
33 33
         if (strncasecmp($method, "get", 3) === 0) {
34
-            $var = preg_replace_callback('/[A-Z]/', function ($c) {
34
+            $var = preg_replace_callback('/[A-Z]/', function($c) {
35 35
                 return '_'.strtolower($c[0]);
36 36
             }, lcfirst(substr($method, 3)));
37 37
             return $this->$var;
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         return $content;
137 137
     }
138 138
 
139
-    private function _runGetBuffer($files, $allowed_errors=[E_WARNING])
139
+    private function _runGetBuffer($files, $allowed_errors = [E_WARNING])
140 140
     {
141 141
         // Require files
142 142
         ob_implicit_flush(0);
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         }
154 154
         $content = "";
155 155
         while ($level = ob_get_clean()) {
156
-            $content = $level . $content;
156
+            $content = $level.$content;
157 157
         }
158 158
         return $content;
159 159
     }
Please login to merge, or discard this patch.
src/LumenerServiceProvider.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
         }
40 40
         if (isset($route_options['middleware'])) {
41 41
             $route_options['middleware'] =
42
-             array_unique(array_merge(
43
-                 array_keys($this->middleware),
44
-                 is_array($route_options['middleware']) ?
42
+                array_unique(array_merge(
43
+                    array_keys($this->middleware),
44
+                    is_array($route_options['middleware']) ?
45 45
                   $route_options['middleware'] : [$route_options['middleware']]
46 46
             ));
47 47
         } else {
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
             foreach ($route['action'] as $key => $value) {
78 78
                 if ($key == "middleware") {
79 79
                     $this->route_options['middleware'] =
80
-                     array_unique(array_merge(
81
-                         $this->route_options['middleware'],
82
-                         is_array($value) ? $value : [$value]
80
+                        array_unique(array_merge(
81
+                            $this->route_options['middleware'],
82
+                            is_array($value) ? $value : [$value]
83 83
                     ));
84 84
                 } elseif ($key == "uses") {
85 85
                     $this->route_options[$key] = "\\{$value}";
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             $router->get(
102 102
                 $this->route_path . '/resources',
103 103
                 ['uses' => 'LumenerController@getResource',
104
-                 'as' => 'lumener-resources']
104
+                    'as' => 'lumener-resources']
105 105
             );
106 106
         });
107 107
     }
@@ -178,6 +178,6 @@  discard block
 block discarded – undo
178 178
                 'command.lumener.update',
179 179
                 'command.lumener.stylize',
180 180
                 'command.lumener.plugin'
181
-             ];
181
+                ];
182 182
     }
183 183
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             $this->route_path = $uri;
91 91
         }
92 92
         $this->route_options['namespace'] = $this->namespace;
93
-        $this->app->router->group($this->route_options, function ($router) {
93
+        $this->app->router->group($this->route_options, function($router) {
94 94
             $router->addRoute(
95 95
                 ['GET', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
96 96
                 $this->route_path,
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             $this->route_options['as'] = "lumener-resources";
100 100
             $this->route_options['uses'] = 'LumenerController@getResource';
101 101
             $router->get(
102
-                $this->route_path . '/resources',
102
+                $this->route_path.'/resources',
103 103
                 ['uses' => 'LumenerController@getResource',
104 104
                  'as' => 'lumener-resources']
105 105
             );
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     {
111 111
         // TODO: Merge routes for laravel
112 112
         \Route::namespace($this->namespace)
113
-            ->group(function () {
113
+            ->group(function() {
114 114
                 Route::any($this->route_path, $this->route_options);
115 115
                 $this->route_options['uses'] = "LumenerController@getResource'";
116 116
                 Route::get($this->route_path.'/resources', $this->route_options);
@@ -143,20 +143,20 @@  discard block
 block discarded – undo
143 143
 
144 144
         $this->app->singleton(
145 145
             'command.lumener.update',
146
-            function (/** @scrutinizer ignore-unused */ $app) {
146
+            function(/** @scrutinizer ignore-unused */ $app) {
147 147
                 return new UpdateCommand();
148 148
             }
149 149
         );
150 150
 
151 151
         $this->app->singleton(
152 152
             'command.lumener.stylize',
153
-            function (/** @scrutinizer ignore-unused */ $app) {
153
+            function(/** @scrutinizer ignore-unused */ $app) {
154 154
                 return new StylizeCommand();
155 155
             }
156 156
         );
157 157
         $this->app->singleton(
158 158
             'command.lumener.plugin',
159
-            function (/** @scrutinizer ignore-unused */ $app) {
159
+            function(/** @scrutinizer ignore-unused */ $app) {
160 160
                 return new PluginCommand();
161 161
             }
162 162
         );
Please login to merge, or discard this patch.
src/console/UpdateCommand.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             if (file_exists($this->filename)) {
65 65
                 $fn = fopen($this->filename, "r");
66 66
                 if ($fn !== false) {
67
-                    for ($i=0; !$current_version && $i < 20 && !feof($fn); $i++) {
67
+                    for ($i = 0; !$current_version && $i < 20 && !feof($fn); $i++) {
68 68
                         $line = fgets($fn, 30);
69 69
                         preg_match_all("/@version ((\d([\.-]|$))+)/", $line, $m);
70 70
                         if (!empty($m[1])) {
@@ -98,10 +98,10 @@  discard block
 block discarded – undo
98 98
         );
99 99
         if (config('lumener.adminer.version_type', 'url') == 'url') {
100 100
             $version = $this->_getLatestAdminerVersion($vsource);
101
-            $this->info("Lumener: Latest Adminer Version " . $version);
101
+            $this->info("Lumener: Latest Adminer Version ".$version);
102 102
         } else {
103 103
             $version = $vsource;
104
-            $this->info("Lumener: Required Adminer Version " . $version);
104
+            $this->info("Lumener: Required Adminer Version ".$version);
105 105
         }
106 106
         return $verison;
107 107
     }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     {
114 114
         foreach (config(
115 115
             'lumener.adminer.rename_list',
116
-            ['redirect','cookie','view', 'exit', 'ob_flush']
116
+            ['redirect', 'cookie', 'view', 'exit', 'ob_flush']
117 117
         ) as $var) {
118 118
             ShellHelper::rename($var, $this->filename);
119 119
         }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                 (
135 135
                     $response ? "\r\n[{$response->getStatusCode()}]
136 136
                     {$response->getReasonPhrase()} {(string)$response->getBody()}"
137
-                    : "Connection Failed.\r\n" . ShellHelper::$LastError
137
+                    : "Connection Failed.\r\n".ShellHelper::$LastError
138 138
                 )
139 139
             );
140 140
             return;
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
                 (
170 170
                     $response ? "\r\n[{$response->getStatusCode()}]
171 171
                     {$response->getReasonPhrase()} {(string)$response->getBody()}"
172
-                    : "Connection Failed.\r\n" . ShellHelper::$LastError
172
+                    : "Connection Failed.\r\n".ShellHelper::$LastError
173 173
                 )
174 174
             );
175 175
             return false;
Please login to merge, or discard this patch.