Skip to content

Commit

Permalink
Merge pull request #61 from martijnengler/issue-56-add-large-option
Browse files Browse the repository at this point in the history
Add --large command option (fixes #56)
  • Loading branch information
roberto-butti authored Oct 2, 2021
2 parents 58e4bfb + cf6d17a commit 7f6a261
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Console/LaraLensCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class LaraLensCommand extends Command
{--show=* : show (all|config|runtime|connection|database|migration|php-ext|php-ini|os)}
{--width-label=' . self::DEFAULT_WIDTH . ' : width of column for label}
{--width-value=' . self::DEFAULT_WIDTH . ' : width of column for value}
{--large : use 120 columns for the output}
{--style=' . self::DEFAULT_STYLE . ' : style for output table (' . self::TABLE_STYLES . ')}
{--skip-database : skip database check (if your laravel app doesn\'t need Database)}
{--a|all : verbose output (--show=all)}
Expand All @@ -30,6 +31,7 @@ class LaraLensCommand extends Command
protected $description = 'Show some application configurations.';

private const DEFAULT_WIDTH = 36;
private const DEFAULT_LARGE_WIDTH = 77;
protected $widthLabel = self::DEFAULT_WIDTH;
protected $widthValue = self::DEFAULT_WIDTH;

Expand Down Expand Up @@ -256,6 +258,9 @@ public function handle()

$this->widthLabel = $this->option("width-label");
$this->widthValue = $this->option("width-value");
if ($this->option("large")) {
$this->widthValue = self::DEFAULT_LARGE_WIDTH;
}

$this->urlPath = $this->option("url-path");
if (is_null($this->urlPath)) {
Expand Down

0 comments on commit 7f6a261

Please sign in to comment.