Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 16 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
30 | 8 | public function addActionType(string $type, mixed $filter = null, ?string $agenda = null): self |
|
31 | { |
||
32 | 8 | if (isset($this->data['actionType'])) { |
|
33 | 1 | throw new \LogicException('Duplicate action type.'); |
|
34 | } |
||
35 | |||
36 | 8 | $actionType = new ActionType( |
|
37 | 8 | $this->namespacesPaths, |
|
38 | 8 | $this->sanitizeEncoding, |
|
39 | 8 | $this->companyRegistrationNumber, |
|
40 | 8 | $this->resolveOptions, |
|
41 | 8 | $this->normalizerFactory, |
|
42 | 8 | ); |
|
43 | 8 | $this->data['actionType'] = $actionType->setDirectionalVariable($this->useOneDirectionalVariables)->setData([ |
|
44 | 8 | 'type' => $type, |
|
45 | 8 | 'filter' => $filter, |
|
46 | 8 | 'agenda' => $agenda, |
|
47 | 8 | ]); |
|
48 | |||
49 | 8 | return $this; |
|
50 | } |
||
52 |