| 1 |
<?php |
| 2 |
declare(strict_types=1); |
| 3 |
|
| 4 |
namespace Imagify\CLI; |
| 5 |
|
| 6 |
/** |
| 7 |
* Abstrat class for CLI Command |
| 8 |
*/ |
| 9 |
abstract class AbstractCommand implements CommandInterface { |
| 10 |
/** |
| 11 |
* {@inheritdoc} |
| 12 |
*/ |
| 13 |
final public function get_name(): string { |
| 14 |
return sprintf( 'imagify %s', $this->get_command_name() ); |
| 15 |
} |
| 16 |
|
| 17 |
/** |
| 18 |
* Get the "imagify" command name. |
| 19 |
* |
| 20 |
* @return string |
| 21 |
*/ |
| 22 |
abstract protected function get_command_name(): string; |
| 23 |
|
| 24 |
/** |
| 25 |
* {@inheritdoc} |
| 26 |
*/ |
| 27 |
public function get_synopsis(): array { |
| 28 |
return []; |
| 29 |
} |
| 30 |
} |
| 31 |
|