| Total Complexity | 4 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | abstract class AddToList extends Base |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The console command description. |
||
| 12 | * |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $description = 'Add an IP address to %s.'; |
||
| 16 | |||
| 17 | public function __construct() |
||
| 18 | { |
||
| 19 | parent::__construct(); |
||
| 20 | |||
| 21 | $this->description = sprintf($this->description, $this->listName); |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Execute the console command. |
||
| 26 | * |
||
| 27 | * @return mixed |
||
| 28 | */ |
||
| 29 | public function fire() |
||
| 30 | { |
||
| 31 | $this->fireCommand($this->listName, [$this->argument('ip'), $this->option('force')]); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Get the console command arguments. |
||
| 36 | * |
||
| 37 | * @return array |
||
| 38 | */ |
||
| 39 | protected function getArguments() |
||
| 43 | ]; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Get the console command options. |
||
| 48 | * |
||
| 49 | * @return array |
||
| 50 | */ |
||
| 51 | protected function getOptions() |
||
| 55 | ]; |
||
| 56 | } |
||
| 57 | } |
||
| 58 |