mirror of
https://github.com/n3w/helpers-cli-input.git
synced 2025-12-20 05:03:24 +00:00
Initial commit
This commit is contained in:
commit
0620d00f08
24 changed files with 1054 additions and 0 deletions
22
src/Input/Exceptions/RequiredArgumentMissingException.php
Normal file
22
src/Input/Exceptions/RequiredArgumentMissingException.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pointybeard\Helpers\Cli\Input\Exceptions;
|
||||
|
||||
class RequiredArgumentMissingException extends \Exception
|
||||
{
|
||||
private $argument;
|
||||
|
||||
public function __construct(string $argument, $code = 0, \Exception $previous = null)
|
||||
{
|
||||
$this->argument = strtoupper($argument);
|
||||
|
||||
return parent::__construct("missing argument {$this->argument}.", $code, $previous);
|
||||
}
|
||||
|
||||
public function getArgumentName(): string
|
||||
{
|
||||
return $this->argument;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue