| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class ObjectWriteException extends ApieException implements LocalizationableException |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $name; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param ReflectionMethod|ReflectionProperty $method |
||
| 21 | * @param string $fieldName |
||
| 22 | * @param Throwable $previous |
||
| 23 | */ |
||
| 24 | public function __construct( |
||
| 25 | $method, |
||
| 26 | string $fieldName, |
||
| 27 | Throwable $previous |
||
| 28 | ) { |
||
| 29 | $this->name = $method->getName(); |
||
| 30 | $message = 'Could not write property "' . $fieldName . '" with ' . $this->name . ': ' . $previous->getMessage(); |
||
| 31 | parent::__construct(500, $message, $previous); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getI18n(): LocalizationInfo |
||
| 41 | ] |
||
| 42 | ); |
||
| 45 |