Updated command signature

This commit is contained in:
2020-12-27 18:45:28 +00:00
parent 83e87103bf
commit 03cd015f12

View File

@@ -11,7 +11,7 @@ class Gimme implements Command
{ {
use HasSignature; use HasSignature;
public $signature = "gimme {what: What to give you. Can be a cat pic!} {quantity: How many cat pictures do you want?}"; public $signature = "gimme {thing: What to give you} {quantity: How many cat pictures}";
private $cats; private $cats;
@@ -29,7 +29,7 @@ class Gimme implements Command
throw new Exception('Sorry, but I can\'t send you more than 25 cat pictures at a time. What a cat lover!'); throw new Exception('Sorry, but I can\'t send you more than 25 cat pictures at a time. What a cat lover!');
} }
switch($parameters['what']) { switch($parameters['thing']) {
case "cat": case "cat":
@@ -37,7 +37,7 @@ class Gimme implements Command
try try
{ {
// Many pictures will return a list of pictures, separated by new lines // Many pictures will return a list of pictures, separated by new lines
return $this->cats->getCatPicture($parameters['quantity'], "small"); return $this->cats->getCatPicture($parameters['what'], "small");
} }
catch (Exception $ex) catch (Exception $ex)
{ {