| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | 1 | public function performValidation() |
|
| 21 | { |
||
| 22 | 1 | $validated = glsr()->filter('validate/custom', true, $this->request); // value may be a string |
|
| 23 | 1 | if (true === Cast::toBool($validated)) { |
|
| 24 | 1 | return; |
|
| 25 | } |
||
| 26 | 1 | if (!is_string($validated)) { |
|
| 27 | 1 | $validated = __('The review submission failed. Please notify the site administrator.', 'site-reviews'); |
|
| 28 | } |
||
| 29 | 1 | $this->setErrors($validated); |
|
| 30 | 1 | } |
|
| 32 |