Migrate from interface to abstract
This commit is contained in:
parent
3bb1ecb748
commit
c8213a6c03
4 changed files with 8 additions and 27 deletions
|
@ -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
|
||||
{
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Cli\Collection;
|
||||
|
||||
use Runtime\Contracts\Console\Command;
|
||||
use Cli\Commands\Command;
|
||||
|
||||
class CommandsCollection
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Runtime\Contracts\Console;
|
||||
|
||||
interface Command
|
||||
{
|
||||
|
||||
/*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle();
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName();
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription();
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue