| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 34 | 23 | public function getAttributes(): array |
|
| 35 | { |
||
| 36 | 23 | $attributes = get_object_vars($this); |
|
| 37 | 23 | foreach ($attributes as $name => $value) { |
|
| 38 | 23 | $method = 'get' . ucfirst($name); |
|
| 39 | 23 | if (method_exists($this, $method)) { |
|
| 40 | 23 | $attributes[$name] = $this->$method(); |
|
| 41 | } |
||
| 42 | } |
||
| 43 | //unset($attributes['type'], $attributes['value'], $attributes['name']); |
||
| 44 | |||
| 45 | 23 | return $attributes; |
|
| 46 | } |
||
| 48 |