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