From a49ba63d2ef70ab9c70fc12635ae81e69d364dfe Mon Sep 17 00:00:00 2001 From: Roberto B Date: Mon, 7 Sep 2020 21:51:34 +0200 Subject: [PATCH] Fix Code style --- src/LaraLensServiceProvider.php | 20 +++++++++++++------- src/Lens/LaraLens.php | 2 +- src/Lens/Objects/LaraHttpResponse.php | 3 +++ src/Lens/Traits/DatabaseLens.php | 21 +++++++++++---------- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/src/LaraLensServiceProvider.php b/src/LaraLensServiceProvider.php index 42717c7..8847cf3 100755 --- a/src/LaraLensServiceProvider.php +++ b/src/LaraLensServiceProvider.php @@ -23,9 +23,11 @@ public function boot() // $this->loadRoutesFrom(__DIR__.'/routes.php'); if ($this->app->runningInConsole()) { - $this->publishes([ + $this->publishes( + [ __DIR__.'/../config/config.php' => config_path('lara-lens.php'), - ], 'config'); + ], 'config' + ); // Publishing the views. /*$this->publishes([ @@ -43,9 +45,11 @@ public function boot() ], 'lang');*/ // Registering package commands. - $this->commands([ + $this->commands( + [ LaraLensCommand::class, - ]); + ] + ); } } @@ -58,8 +62,10 @@ public function register() $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'lara-lens'); // Register the main class to use with the facade - $this->app->singleton('lara-lens', function () { - return new LaraLens; - }); + $this->app->singleton( + 'lara-lens', function () { + return new LaraLens; + } + ); } } diff --git a/src/Lens/LaraLens.php b/src/Lens/LaraLens.php index a45a003..b350339 100755 --- a/src/Lens/LaraLens.php +++ b/src/Lens/LaraLens.php @@ -44,7 +44,7 @@ public function getCredits() /** - * @param bool $b + * @param bool $b * @return string */ public static function printBool(bool $b) diff --git a/src/Lens/Objects/LaraHttpResponse.php b/src/Lens/Objects/LaraHttpResponse.php index 2ab8002..c5a0a88 100644 --- a/src/Lens/Objects/LaraHttpResponse.php +++ b/src/Lens/Objects/LaraHttpResponse.php @@ -12,6 +12,7 @@ class LaraHttpResponse /** * LaraHttpResponse constructor. + * * @param ResponseInterface $r */ public function __construct(ResponseInterface $r) @@ -21,6 +22,7 @@ public function __construct(ResponseInterface $r) /** * Return the Http response status code. + * * @return int */ public function status() @@ -30,6 +32,7 @@ public function status() /** * Return true if the status code of the HTTP response is an error + * * @return bool */ public function failed() diff --git a/src/Lens/Traits/DatabaseLens.php b/src/Lens/Traits/DatabaseLens.php index f533d1f..221b10d 100644 --- a/src/Lens/Traits/DatabaseLens.php +++ b/src/Lens/Traits/DatabaseLens.php @@ -37,6 +37,7 @@ public function getTablesListSqlite() /** * Try to establish a db connection. * If it fails, return FALSE and fill checksBag. + * * @return false|\Illuminate\Database\ConnectionInterface */ public function dbConnection() @@ -138,16 +139,16 @@ public function getDatabaseConnectionInfos(ConnectionInterface $dbconnection, Re ); $stringTables=""; switch ($connectionType) { - case 'mysql': - $stringTables= $this->getTablesListMysql(); - break; - case 'sqlite': - $stringTables = $this->getTablesListSqlite(); - break; - - default: - $stringTables = "<>"; - break; + case 'mysql': + $stringTables= $this->getTablesListMysql(); + break; + case 'sqlite': + $stringTables = $this->getTablesListSqlite(); + break; + + default: + $stringTables = "<>"; + break; } $results->add( "Tables",