generated from yiisoft/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathHello.php
More file actions
25 lines (20 loc) · 570 Bytes
/
Hello.php
File metadata and controls
25 lines (20 loc) · 570 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
declare(strict_types=1);
namespace App\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Yiisoft\Yii\Console\ExitCode;
#[AsCommand(
name: 'hello',
description: 'An example command',
)]
final class Hello extends Command
{
protected function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln('Hello!');
return ExitCode::OK;
}
}