| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 42 | 5 | public function __invoke( |
|
| 43 | string $name, |
||
| 44 | string $value = null, |
||
| 45 | array $attributes = [] |
||
| 46 | ): AbstractInput { |
||
| 47 | 5 | $this->attributes = [ |
|
| 48 | 5 | "type" => $this->type, |
|
| 49 | 5 | "name" => $name, |
|
| 50 | ]; |
||
| 51 | |||
| 52 | 5 | if (!isset($attributes["id"])) { |
|
| 53 | 5 | $this->attributes["id"] = $name; |
|
| 54 | } |
||
| 55 | |||
| 56 | 5 | $this->setValue($value); |
|
| 57 | |||
| 58 | 5 | $this->attributes = array_merge($this->attributes, $attributes); |
|
| 59 | |||
| 60 | 5 | return $this; |
|
| 61 | } |
||
| 96 |