| Total Complexity | 4 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | trait HasErrors |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * The "errors" member |
||
| 14 | * |
||
| 15 | * @var array<ErrorFactory> |
||
| 16 | */ |
||
| 17 | public $errors; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Set the "errors" member |
||
| 21 | * |
||
| 22 | * @param array<ErrorFactory> $errors |
||
| 23 | * |
||
| 24 | * @return static |
||
| 25 | */ |
||
| 26 | 4 | public function setErrors(array $errors) |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Add a single error to the "errors" member |
||
| 35 | * |
||
| 36 | * @param ErrorFactory $error |
||
| 37 | * |
||
| 38 | * @return static |
||
| 39 | */ |
||
| 40 | 1 | public function addError($error) |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Fill the "errors" member with fake values |
||
| 49 | * |
||
| 50 | * @param integer $count |
||
| 51 | * |
||
| 52 | * @return static |
||
| 53 | */ |
||
| 54 | 1 | public function fakeErrors($count = 2) |
|
| 64 |