| Conditions | 4 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4.0218 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | 14 | protected function normalizeValue(): void |
|
| 18 | { |
||
| 19 | 14 | $this->field->value = Cast::toString($this->field->value); |
|
| 20 | 14 | if (!empty($this->field->value)) { |
|
| 21 | return; |
||
| 22 | } |
||
| 23 | 14 | if ('review' !== $this->field->location()) { |
|
| 24 | 1 | return; |
|
| 25 | } |
||
| 26 | 13 | if (!in_array($this->field->original_name, glsr_get_option('forms.autofill', [], 'array'))) { |
|
| 27 | 1 | return; |
|
| 28 | } |
||
| 29 | 12 | $this->field->value = glsr(Sanitizer::class)->sanitizeUserEmail(''); |
|
| 30 | } |
||
| 32 |