Skip to content

Commit

Permalink
chore: delete redundant code in DemoCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
albertcht committed Jul 24, 2024
1 parent 195a6ed commit 5eafe02
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions app/Console/Commands/DemoCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,15 @@

namespace App\Console\Commands;

use Psr\Container\ContainerInterface;
use SwooleTW\Hyperf\Foundation\Console\Command;

class DemoCommand extends Command
{
protected ?string $signature = 'demo:hi {--name= : name}';
protected string $description = 'Hyperf Demo Command';

public function __construct(protected ContainerInterface $container)
{
parent::__construct();
}

public function configure()
{
parent::configure();
}

public function handle()
{
$this->line('Hello ' . ($this->option('name') ?: 'Hyperf'), 'info');
$this->info('Hello ' . ($this->option('name') ?: 'Hyperf'));
}
}

0 comments on commit 5eafe02

Please sign in to comment.