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