@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | // Laravel |
| 62 | 62 | // TODO: Merge routes for laravel |
| 63 | 63 | \Route::namespace($this->namespace) |
| 64 | - ->group(function () { |
|
| 64 | + ->group(function() { |
|
| 65 | 65 | Route::any($this->route_path, $this->route_options); |
| 66 | 66 | $this->route_options['uses'] = "LumenerController@getResource'"; |
| 67 | 67 | Route::get($this->route_path.'/resources', $this->route_options); |
@@ -90,7 +90,7 @@ discard block |
||
| 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, |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $this->route_options['as'] = "lumener-resources"; |
| 101 | 101 | $this->route_options['uses'] = 'LumenerController@getResource'; |
| 102 | 102 | $router->get( |
| 103 | - $this->route_path . '/resources', |
|
| 103 | + $this->route_path.'/resources', |
|
| 104 | 104 | ['uses' => 'LumenerController@getResource', |
| 105 | 105 | 'as' => 'lumener-resources'] |
| 106 | 106 | ); |
@@ -134,20 +134,20 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | $this->app->singleton( |
| 136 | 136 | 'command.lumener.update', |
| 137 | - function ($app) { |
|
| 137 | + function($app) { |
|
| 138 | 138 | return new UpdateCommand(); |
| 139 | 139 | } |
| 140 | 140 | ); |
| 141 | 141 | |
| 142 | 142 | $this->app->singleton( |
| 143 | 143 | 'command.lumener.stylize', |
| 144 | - function ($app) { |
|
| 144 | + function($app) { |
|
| 145 | 145 | return new StylizeCommand(); |
| 146 | 146 | } |
| 147 | 147 | ); |
| 148 | 148 | $this->app->singleton( |
| 149 | 149 | 'command.lumener.plugin', |
| 150 | - function ($app) { |
|
| 150 | + function($app) { |
|
| 151 | 151 | return new PluginCommand(); |
| 152 | 152 | } |
| 153 | 153 | ); |
@@ -2,7 +2,7 @@ discard block |
||
| 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 |
||
| 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", |
@@ -45,7 +45,7 @@ |
||
| 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'); |
@@ -79,7 +79,7 @@ |
||
| 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 | } |
@@ -70,7 +70,7 @@ |
||
| 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 { |
@@ -15,7 +15,7 @@ |
||
| 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 |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | try { |
| 67 | 67 | if (file_exists($this->filename)) { |
| 68 | 68 | $fn = fopen($this->filename, "r"); |
| 69 | - for ($i=0; !$current_version && $i < 20 && !feof($fn); $i++) { |
|
| 69 | + for ($i = 0; !$current_version && $i < 20 && !feof($fn); $i++) { |
|
| 70 | 70 | $line = fgets($fn, 30); |
| 71 | 71 | preg_match_all("/@version ((\d([\.-]|$))+)/", $line, $m); |
| 72 | 72 | if (!empty($m[1])) { |
@@ -88,10 +88,10 @@ discard block |
||
| 88 | 88 | ); |
| 89 | 89 | if (config('lumener.adminer.version_type', 'url') == 'url') { |
| 90 | 90 | $version = $this->_getLatestAdminerVersion($vsource); |
| 91 | - $this->info("Lumener: Latest Adminer Version " . $version); |
|
| 91 | + $this->info("Lumener: Latest Adminer Version ".$version); |
|
| 92 | 92 | } else { |
| 93 | 93 | $version = $vsource; |
| 94 | - $this->info("Lumener: Required Adminer Version " . $version); |
|
| 94 | + $this->info("Lumener: Required Adminer Version ".$version); |
|
| 95 | 95 | } |
| 96 | 96 | if ($force || !file_exists($this->filename) |
| 97 | 97 | || $version != $current_version) { |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | { |
| 109 | 109 | foreach (config( |
| 110 | 110 | 'lumener.adminer.rename_list', |
| 111 | - ['redirect','cookie','view', 'exit', 'ob_flush'] |
|
| 111 | + ['redirect', 'cookie', 'view', 'exit', 'ob_flush'] |
|
| 112 | 112 | ) as $var) { |
| 113 | 113 | ShellHelper::rename($var, $this->filename); |
| 114 | 114 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | ( |
| 130 | 130 | $response ? "\r\n[{$response->getStatusCode()}] |
| 131 | 131 | {$response->getReasonPhrase()} {(string)$response->getBody()}" |
| 132 | - : "Connection Failed.\r\n" . ShellHelper::$LastError |
|
| 132 | + : "Connection Failed.\r\n".ShellHelper::$LastError |
|
| 133 | 133 | ) |
| 134 | 134 | ); |
| 135 | 135 | return; |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | ( |
| 165 | 165 | $response ? "\r\n[{$response->getStatusCode()}] |
| 166 | 166 | {$response->getReasonPhrase()} {(string)$response->getBody()}" |
| 167 | - : "Connection Failed.\r\n" . ShellHelper::$LastError |
|
| 167 | + : "Connection Failed.\r\n".ShellHelper::$LastError |
|
| 168 | 168 | ) |
| 169 | 169 | ); |
| 170 | 170 | return false; |
@@ -31,7 +31,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |