| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Setono\SyliusSchedulerPlugin\Fixture; |
||
| 6 | |||
| 7 | use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; |
||
| 8 | |||
| 9 | final class ScheduleFixture extends AbstractResourceFixture |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @return string |
||
| 13 | */ |
||
| 14 | public function getName(): string |
||
| 15 | { |
||
| 16 | return 'setono_scheduler_schedule'; |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * {@inheritdoc} |
||
| 21 | */ |
||
| 22 | protected function configureResourceNode(ArrayNodeDefinition $resourceNode): void |
||
| 23 | { |
||
| 24 | $resourceNode |
||
| 25 | ->children() |
||
| 26 | ->scalarNode('code')->cannotBeEmpty()->end() |
||
| 27 | ->scalarNode('name')->end() |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 28 | ->scalarNode('command')->cannotBeEmpty()->end() |
||
| 29 | ->arrayNode('args') |
||
| 30 | ->requiresAtLeastOneElement() |
||
| 31 | ->treatNullLike([]) |
||
| 32 | ->beforeNormalization()->castToArray()->end() |
||
| 33 | ->scalarPrototype()->cannotBeEmpty()->end() |
||
| 34 | ->end() |
||
| 35 | ->scalarNode('queue')->cannotBeEmpty()->end() |
||
| 36 | ->scalarNode('priority')->cannotBeEmpty()->end() |
||
| 37 | ->scalarNode('created_at')->cannotBeEmpty()->end() |
||
| 38 | ->scalarNode('cron_expression')->cannotBeEmpty()->end() |
||
| 39 | ->end() |
||
| 40 | ; |
||
| 41 | } |
||
| 42 | } |
||
| 43 |