|
12 | 12 | namespace PHPFUI\HTMLUnitTester;
|
13 | 13 |
|
14 | 14 | class ErrorConstraint extends \PHPUnit\Framework\Constraint\Constraint
|
15 |
| - { |
16 |
| - /** |
17 |
| - * Returns a string representation of the constraint. |
18 |
| - * |
19 |
| - */ |
20 |
| - public function toString() : string |
21 |
| - { |
22 |
| - return 'is valid'; |
23 |
| - } |
| 15 | + { |
| 16 | + /** |
| 17 | + * Returns a string representation of the constraint. |
| 18 | + * |
| 19 | + */ |
| 20 | + public function toString() : string |
| 21 | + { |
| 22 | + return 'is valid'; |
| 23 | + } |
24 | 24 |
|
25 |
| - /** |
26 |
| - * Return additional failure description where needed. |
27 |
| - * |
28 |
| - * The function can be overridden to provide additional failure |
29 |
| - * information like a diff |
30 |
| - * |
31 |
| - * @param mixed $other Evaluated value or object. |
32 |
| - * |
33 |
| - */ |
34 |
| - protected function additionalFailureDescription($other) : string |
35 |
| - { |
36 |
| - return implode("\n", $other->getErrors()); |
37 |
| - } |
| 25 | + /** |
| 26 | + * Return additional failure description where needed. |
| 27 | + * |
| 28 | + * The function can be overridden to provide additional failure |
| 29 | + * information like a diff |
| 30 | + * |
| 31 | + * @param mixed $other Evaluated value or object. |
| 32 | + * |
| 33 | + */ |
| 34 | + protected function additionalFailureDescription($other) : string |
| 35 | + { |
| 36 | + return implode("\n", $other->getErrors()); |
| 37 | + } |
38 | 38 |
|
39 |
| - /** |
40 |
| - * Returns the description of the failure. |
41 |
| - * |
42 |
| - * The beginning of failure messages is "Failed asserting that" in most |
43 |
| - * cases. This method should return the second part of that sentence. |
44 |
| - * |
45 |
| - * @param mixed $other Evaluated value or object. |
46 |
| - * |
47 |
| - */ |
48 |
| - protected function failureDescription($other) : string |
49 |
| - { |
50 |
| - return 'the markup ' . $this->toString(); |
51 |
| - } |
| 39 | + /** |
| 40 | + * Returns the description of the failure. |
| 41 | + * |
| 42 | + * The beginning of failure messages is "Failed asserting that" in most |
| 43 | + * cases. This method should return the second part of that sentence. |
| 44 | + * |
| 45 | + * @param mixed $other Evaluated value or object. |
| 46 | + * |
| 47 | + */ |
| 48 | + protected function failureDescription($other) : string |
| 49 | + { |
| 50 | + return 'the markup ' . $this->toString(); |
| 51 | + } |
52 | 52 |
|
53 |
| - /** |
54 |
| - * Evaluates the constraint for parameter $other. Returns TRUE if the |
55 |
| - * constraint is met, FALSE otherwise. |
56 |
| - * |
57 |
| - * @param mixed $other Value or object to evaluate. |
58 |
| - * |
59 |
| - */ |
60 |
| - protected function matches($other) : bool |
61 |
| - { |
62 |
| - return ! $other->hasErrors(); |
63 |
| - } |
| 53 | + /** |
| 54 | + * Evaluates the constraint for parameter $other. Returns TRUE if the |
| 55 | + * constraint is met, FALSE otherwise. |
| 56 | + * |
| 57 | + * @param mixed $other Value or object to evaluate. |
| 58 | + * |
| 59 | + */ |
| 60 | + protected function matches($other) : bool |
| 61 | + { |
| 62 | + return ! $other->hasErrors(); |
| 63 | + } |
64 | 64 |
|
65 |
| - } |
| 65 | + } |
0 commit comments