Skip to content

Commit

Permalink
Fix some small bugs thanks to PHPSTAN 👍
Browse files Browse the repository at this point in the history
- using $line instead of $row
- initialize correctly $show
- re trhrow exception for HTTP connection
  • Loading branch information
roberto-butti committed Sep 11, 2020
1 parent 70675af commit daa258d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Console/LaraLensCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private function printOutput(array $headers, array $rows)
foreach ($rowsLine as $key => $line) {
$label = Arr::get($line, "label", "");
$value = Arr::get($line, "value", "");
$lineType = Arr::get($row, "lineType", ResultLens::LINE_TYPE_DEFAULT);
$lineType = Arr::get($line, "lineType", ResultLens::LINE_TYPE_DEFAULT);
if ($label != "") {
$this->info($label . ":");
}
Expand Down Expand Up @@ -195,6 +195,7 @@ public function handle()
$op = $this->argument("op");
$checkTable = $this->option("table");
$styleTable = $this->option("style");
$show = self::OPTION_SHOW_NONE;
if (in_array($styleTable, explode("|", self::TABLE_STYLES))) {
$this->styleTable = $styleTable;
} else {
Expand Down
1 change: 1 addition & 0 deletions src/Lens/LaraHttp.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public static function get($url)
$response = new LaraHttpResponse($client->get($url));
} catch (GuzzleException $e) {
$response = null;
throw $e;
}
return $response;
}
Expand Down
3 changes: 3 additions & 0 deletions src/Lens/Traits/FilesystemLens.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
use HiFolks\LaraLens\ResultLens;
use Illuminate\Support\Facades\App;


trait FilesystemLens
{
public function checkFiles()
{


$results = new ResultLens();
$envExists = file_exists(App::environmentFilePath());
if ($envExists) {
Expand Down

0 comments on commit daa258d

Please sign in to comment.