1 | <?php |
||
22 | class AllValidationErrorsOccur extends AbstractPHPUnitConstraint |
||
23 | { |
||
24 | /** @var string[] */ |
||
25 | private $expectedValidationErrorMessages; |
||
26 | |||
27 | /** |
||
28 | * @var string[] |
||
29 | */ |
||
30 | private $missingValidationErrorMessages = []; |
||
31 | |||
32 | /** |
||
33 | * @param string[] $expectedValidationErrorMessages |
||
34 | */ |
||
35 | public function __construct(array $expectedValidationErrorMessages) |
||
39 | |||
40 | /** |
||
41 | * @param \eZ\Publish\API\Repository\Exceptions\ContentFieldValidationException $other |
||
42 | * |
||
43 | * @return bool |
||
44 | */ |
||
45 | protected function matches($other): bool |
||
56 | |||
57 | /** |
||
58 | * @param \eZ\Publish\API\Repository\Exceptions\ContentFieldValidationException $exception |
||
59 | * |
||
60 | * @return string[] |
||
61 | */ |
||
62 | private function extractAllFieldErrorMessages(ContentFieldValidationException $exception): array |
||
81 | |||
82 | /** |
||
83 | * @param \eZ\Publish\API\Repository\Exceptions\ContentFieldValidationException $other |
||
84 | * |
||
85 | * @return string |
||
86 | */ |
||
87 | protected function failureDescription($other): string |
||
95 | |||
96 | /** |
||
97 | * Returns a string representation of the object. |
||
98 | * |
||
99 | * @return string |
||
100 | */ |
||
101 | public function toString(): string |
||
107 | } |
||
108 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.