@@ -20,9 +20,10 @@ |
||
| 20 | 20 | { |
| 21 | 21 | if (mb_strlen($data, 'UTF-8') >= $this->minLength) { |
| 22 | 22 | return new Result\Success(); |
| 23 | - } |
|
| 24 | - else return new Result\Failure( |
|
| 23 | + } else { |
|
| 24 | + return new Result\Failure( |
|
| 25 | 25 | new RuleError(RuleErrorCode::TOO_SHORT, |
| 26 | 26 | 'The supplied string is too short')); |
| 27 | + } |
|
| 27 | 28 | } |
| 28 | 29 | } |
| 29 | 30 | \ No newline at end of file |
@@ -22,9 +22,10 @@ |
||
| 22 | 22 | { |
| 23 | 23 | if (mb_strlen($data, 'UTF-8') <= $this->maxLength) { |
| 24 | 24 | return new Success(); |
| 25 | - } |
|
| 26 | - else return new Failure( |
|
| 25 | + } else { |
|
| 26 | + return new Failure( |
|
| 27 | 27 | new RuleError(RuleErrorCode::TOO_LONG, |
| 28 | 28 | 'The supplied string is too long')); |
| 29 | + } |
|
| 29 | 30 | } |
| 30 | 31 | } |
| 31 | 32 | \ No newline at end of file |