From c8213a6c033f9233cd724bd78e8d3dacb44d74c7 Mon Sep 17 00:00:00 2001 From: Maarten Date: Thu, 13 Feb 2020 19:27:37 +0100 Subject: [PATCH] Migrate from interface to abstract --- app/Console/Commands/TestCommand.php | 3 +-- src/Cli/Collection/CommandsCollection.php | 2 +- src/Cli/Commands/Command.php | 7 ++++++- src/Runtime/Contracts/Console/Command.php | 23 ----------------------- 4 files changed, 8 insertions(+), 27 deletions(-) delete mode 100644 src/Runtime/Contracts/Console/Command.php diff --git a/app/Console/Commands/TestCommand.php b/app/Console/Commands/TestCommand.php index b9d07f9..913a3c8 100644 --- a/app/Console/Commands/TestCommand.php +++ b/app/Console/Commands/TestCommand.php @@ -3,9 +3,8 @@ namespace App\Console\Commands; use Cli\Commands\Command; -use Runtime\Contracts\Console\Command as CommandInterface; -class TestCommand extends Command implements CommandInterface +class TestCommand extends Command { /** diff --git a/src/Cli/Collection/CommandsCollection.php b/src/Cli/Collection/CommandsCollection.php index adcf88a..a832373 100644 --- a/src/Cli/Collection/CommandsCollection.php +++ b/src/Cli/Collection/CommandsCollection.php @@ -2,7 +2,7 @@ namespace Cli\Collection; -use Runtime\Contracts\Console\Command; +use Cli\Commands\Command; class CommandsCollection { diff --git a/src/Cli/Commands/Command.php b/src/Cli/Commands/Command.php index a53e8ba..0b7216b 100644 --- a/src/Cli/Commands/Command.php +++ b/src/Cli/Commands/Command.php @@ -4,7 +4,7 @@ namespace Cli\Commands; use Cli\Assets\Console; -class Command +abstract class Command { use Console; @@ -23,6 +23,11 @@ class Command */ private $args = []; + /* + * @return mixed + */ + abstract public function handle(); + /** * Command constructor. */ diff --git a/src/Runtime/Contracts/Console/Command.php b/src/Runtime/Contracts/Console/Command.php deleted file mode 100644 index d1493dc..0000000 --- a/src/Runtime/Contracts/Console/Command.php +++ /dev/null @@ -1,23 +0,0 @@ -