| Total Complexity | 5 |
| Total Lines | 63 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class PathException extends Exception |
||
| 10 | { |
||
| 11 | /** @var OpPath */ |
||
| 12 | private $operation; |
||
| 13 | |||
| 14 | /** @var string */ |
||
| 15 | private $field; |
||
| 16 | |||
| 17 | /** @var int */ |
||
| 18 | private $opIndex; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param string $message |
||
| 22 | * @param OpPath $operation |
||
| 23 | * @param string $field |
||
| 24 | * @param int $code |
||
| 25 | * @param Throwable|null $previous |
||
| 26 | */ |
||
| 27 | public function __construct( |
||
| 28 | $message, |
||
| 29 | $operation, |
||
| 30 | $field, |
||
| 31 | $code = 0, |
||
| 32 | Throwable $previous = null |
||
| 33 | ) |
||
| 34 | { |
||
| 35 | parent::__construct($message, $code, $previous); |
||
| 36 | $this->operation = $operation; |
||
| 37 | $this->field = $field; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return OpPath |
||
| 42 | */ |
||
| 43 | public function getOperation() |
||
| 44 | { |
||
| 45 | return $this->operation; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | public function getField() |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param int $opIndex |
||
| 58 | * @return $this |
||
| 59 | */ |
||
| 60 | public function setOpIndex($opIndex) |
||
| 61 | { |
||
| 62 | $this->opIndex = $opIndex; |
||
| 63 | return $this; |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return int |
||
| 68 | */ |
||
| 69 | public function getOpIndex() |
||
| 72 | } |
||
| 73 | } |
||
| 74 |