| Total Complexity | 7 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class InvalidValue extends Exception |
||
| 10 | { |
||
| 11 | public $error; |
||
| 12 | public $path; |
||
| 13 | |||
| 14 | 754 | public function addPath($path) |
|
| 21 | 754 | } |
|
| 22 | |||
| 23 | const INVALID_VALUE = 1; |
||
| 24 | const NOT_IMPLEMENTED = 2; |
||
| 25 | |||
| 26 | |||
| 27 | 1 | public function inspect() |
|
| 28 | { |
||
| 29 | 1 | $error = new Error(); |
|
| 30 | 1 | $error->error = $this->error; |
|
| 31 | 1 | $error->processingPath = $this->path; |
|
| 32 | 1 | $error->dataPointer = PointerUtil::getDataPointer($error->processingPath); |
|
| 33 | 1 | $error->schemaPointers = PointerUtil::getSchemaPointers($error->processingPath); |
|
| 34 | 1 | if ($this instanceof LogicException) { |
|
| 35 | 1 | foreach ($this->subErrors as $subError) { |
|
| 36 | 1 | $error->subErrors[] = $subError->inspect(); |
|
| 37 | } |
||
| 38 | } |
||
| 39 | 1 | return $error; |
|
| 40 | } |
||
| 41 | |||
| 42 | 1 | public function getSchemaPointer() |
|
| 45 | } |
||
| 46 | |||
| 47 | 1 | public function getDataPointer() |
|
| 50 | } |
||
| 51 | |||
| 52 | } |