Skip to content

Commit

Permalink
Fix Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto-butti committed Sep 7, 2020
1 parent 205f362 commit a49ba63
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 18 deletions.
20 changes: 13 additions & 7 deletions src/LaraLensServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand All @@ -43,9 +45,11 @@ public function boot()
], 'lang');*/

// Registering package commands.
$this->commands([
$this->commands(
[
LaraLensCommand::class,
]);
]
);
}
}

Expand All @@ -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;
}
);
}
}
2 changes: 1 addition & 1 deletion src/Lens/LaraLens.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function getCredits()


/**
* @param bool $b
* @param bool $b
* @return string
*/
public static function printBool(bool $b)
Expand Down
3 changes: 3 additions & 0 deletions src/Lens/Objects/LaraHttpResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class LaraHttpResponse

/**
* LaraHttpResponse constructor.
*
* @param ResponseInterface $r
*/
public function __construct(ResponseInterface $r)
Expand All @@ -21,6 +22,7 @@ public function __construct(ResponseInterface $r)

/**
* Return the Http response status code.
*
* @return int
*/
public function status()
Expand All @@ -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()
Expand Down
21 changes: 11 additions & 10 deletions src/Lens/Traits/DatabaseLens.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 = "<<skipped ". $connectionType.">>";
break;
case 'mysql':
$stringTables= $this->getTablesListMysql();
break;
case 'sqlite':
$stringTables = $this->getTablesListSqlite();
break;

default:
$stringTables = "<<skipped ". $connectionType.">>";
break;
}
$results->add(
"Tables",
Expand Down

0 comments on commit a49ba63

Please sign in to comment.