| Total Complexity | 4 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class InvalidFieldTypeException extends Exception |
||
| 10 | { |
||
| 11 | /** @var string */ |
||
| 12 | private $field; |
||
| 13 | /** @var string */ |
||
| 14 | private $expectedType; |
||
| 15 | /** @var OpPath|object */ |
||
| 16 | private $operation; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param string $field |
||
| 20 | * @param string $expectedType |
||
| 21 | * @param OpPath|object $operation |
||
| 22 | * @param int $code |
||
| 23 | * @param Throwable|null $previous |
||
| 24 | */ |
||
| 25 | public function __construct( |
||
| 26 | $field, |
||
| 27 | $expectedType, |
||
| 28 | $operation, |
||
| 29 | $code = 0, |
||
| 30 | Throwable $previous = null |
||
| 31 | ) |
||
| 32 | { |
||
| 33 | parent::__construct( |
||
| 34 | 'Invalid field type - "' . $field . '" should be of type: ' . $expectedType, |
||
| 35 | $code, |
||
| 36 | $previous |
||
| 37 | ); |
||
| 38 | $this->field = $field; |
||
| 39 | $this->expectedType = $expectedType; |
||
| 40 | $this->operation = $operation; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | public function getField() |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | public function getExpectedType() |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @return OpPath|object |
||
| 61 | */ |
||
| 62 | public function getOperation() |
||
| 65 | } |
||
| 66 | } |
||
| 67 |