We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 3 | public function toState(): array |
|
| 37 | { |
||
| 38 | 3 | $state = []; |
|
| 39 | 3 | foreach ($this->getErrors() as $error) { |
|
| 40 | 3 | $state[$error->getName()] = []; |
|
| 41 | 3 | foreach ($error->getErrors() as $violation) { |
|
| 42 | 3 | $state[$error->getName()][] = [ |
|
| 43 | 3 | 'path' => $violation->getPropertyPath(), |
|
| 44 | 3 | 'message' => $violation->getMessage(), |
|
| 45 | 3 | 'code' => $violation->getCode(), |
|
| 46 | ]; |
||
| 47 | } |
||
| 48 | } |
||
| 49 | |||
| 50 | 3 | return $state; |
|
| 51 | } |
||
| 53 |