Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
27 | 1 | public static function inspect(InvalidValue $invalidValue) |
|
28 | { |
||
29 | 1 | $error = new Error(); |
|
30 | 1 | $error->error = $invalidValue->error; |
|
31 | 1 | $error->processingPath = $invalidValue->path; |
|
32 | 1 | $error->dataPointer = PointerUtil::getDataPointer($error->processingPath); |
|
33 | 1 | $error->schemaPointers = PointerUtil::getSchemaPointers($error->processingPath); |
|
34 | 1 | if ($invalidValue instanceof LogicException) { |
|
35 | 1 | foreach ($invalidValue->subErrors as $nestedError) { |
|
36 | 1 | $error->subErrors[] = self::inspect($nestedError); |
|
37 | } |
||
38 | } |
||
39 | 1 | return $error; |
|
40 | } |
||
41 | } |