| Total Complexity | 4 |
| Total Lines | 56 |
| 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 int $opIndex |
||
| 26 | * @param Throwable|null $previous |
||
| 27 | */ |
||
| 28 | public function __construct( |
||
| 29 | $message, |
||
| 30 | $operation, |
||
| 31 | $field, |
||
| 32 | $code = 0, |
||
| 33 | $opIndex, |
||
| 34 | Throwable $previous = null |
||
| 35 | ) |
||
| 36 | { |
||
| 37 | parent::__construct($message, $code, $previous); |
||
| 38 | $this->operation = $operation; |
||
| 39 | $this->field = $field; |
||
| 40 | $this->opIndex = $opIndex; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return OpPath |
||
| 45 | */ |
||
| 46 | public function getOperation() |
||
| 47 | { |
||
| 48 | return $this->operation; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | public function getField() |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @return int |
||
| 61 | */ |
||
| 62 | public function getOpIndex(): int |
||
| 65 | } |
||
| 66 | } |
||
| 67 |