| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function field(string $field, array $test, ?string $placeholder = null): Rules |
||
| 25 | { |
||
| 26 | if(empty($this->action)){ |
||
| 27 | self::$errors[] = self::$err['nFoundForm']; |
||
| 28 | return $this; |
||
| 29 | } |
||
| 30 | |||
| 31 | $this->form[$this->action][$field] = $test; |
||
| 32 | $this->form[$this->action][$field]['placeholder'] = (null !== $placeholder) ? $placeholder : $test; |
||
| 33 | return $this; |
||
| 34 | } |
||
| 41 |