-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConditionTestCommand.php
More file actions
35 lines (30 loc) · 927 Bytes
/
Copy pathConditionTestCommand.php
File metadata and controls
35 lines (30 loc) · 927 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
26
27
28
29
30
31
32
33
34
35
<?php
declare(strict_types=1);
/**
* © 2023-2024 by the orcano team (https://github.com/maxs94/orcano)
*/
namespace App\Command;
use App\Condition\EqualsCondition;
use App\DataObject\ScriptResultDataObject;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
#[AsCommand(
name: 'orcano:condition:test',
description: 'debug, create a condition and output as serialized string'
)]
class ConditionTestCommand extends Command
{
public function execute(InputInterface $input, OutputInterface $output)
{
$conditions = [
ScriptResultDataObject::RESULT_OK => [
'result' => new EqualsCondition(0),
],
];
echo serialize($conditions);
echo PHP_EOL;
return Command::SUCCESS;
}
}