| Total Complexity | 7 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | abstract class Execution implements ExecutionInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var DefinitionInterface |
||
| 23 | */ |
||
| 24 | private DefinitionInterface $context; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var iterable |
||
| 28 | */ |
||
| 29 | private iterable $arguments; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Execution constructor. |
||
| 33 | * |
||
| 34 | * @param DefinitionInterface $context |
||
| 35 | * @param iterable|\Traversable|array $arguments |
||
| 36 | */ |
||
| 37 | public function __construct(DefinitionInterface $context, iterable $arguments = []) |
||
| 38 | { |
||
| 39 | $this->context = $context; |
||
| 40 | |||
| 41 | foreach ($arguments as $name => $value) { |
||
| 42 | $this->arguments[$name] = $value; |
||
| 43 | } |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return DefinitionInterface |
||
| 48 | */ |
||
| 49 | public function getContext(): DefinitionInterface |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return iterable |
||
| 56 | */ |
||
| 57 | public function getArguments(): iterable |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param string $name |
||
| 64 | * @return mixed|null |
||
| 65 | */ |
||
| 66 | public function getArgument(string $name) |
||
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @param string $name |
||
| 73 | * @return bool |
||
| 74 | */ |
||
| 75 | public function hasArgument(string $name): bool |
||
| 80 |