| 1 | <?php |
||
| 6 | class ErrorBag implements Countable |
||
| 7 | { |
||
| 8 | /** @var string[] */ |
||
| 9 | private $prefixes = []; |
||
| 10 | |||
| 11 | public $errors = []; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @param string $prefix |
||
| 15 | */ |
||
| 16 | 3 | public function pushPrefix(string $prefix) |
|
| 20 | |||
| 21 | 3 | public function popPrefix() |
|
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $type |
||
| 28 | * @param array $target |
||
| 29 | */ |
||
| 30 | public function throw(string $type, array $target = []) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | 3 | public function count() |
|
| 45 | |||
| 46 | /** |
||
| 47 | * @return array |
||
| 48 | */ |
||
| 49 | public function errors(): array |
||
| 59 | } |
||
| 60 |