| Total Complexity | 5 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class Definition implements HasNodeIdentifier |
||
| 19 | { |
||
| 20 | use ObjectHashIdentifier; |
||
| 21 | |||
| 22 | /** @var string */ |
||
| 23 | protected $name; |
||
| 24 | |||
| 25 | /** @var Method[] */ |
||
| 26 | protected $methods; |
||
| 27 | |||
| 28 | /** @var Definition */ |
||
| 29 | protected $extends; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param Method[] $methods |
||
| 33 | */ |
||
| 34 | 195 | public function __construct(string $name, array $methods = [], Definition $extends = null) |
|
| 39 | 195 | } |
|
| 40 | |||
| 41 | public function countMethodsByVisibility(Visibility $modifier): int |
||
| 45 | 12 | })); |
|
| 46 | } |
||
| 47 | |||
| 48 | 132 | public function name(): string |
|
| 49 | { |
||
| 50 | 132 | return $this->name; |
|
| 51 | } |
||
| 52 | |||
| 53 | /** @return Method[] */ |
||
| 54 | 42 | public function methods(): array |
|
| 55 | { |
||
| 56 | 42 | return $this->methods; |
|
| 57 | } |
||
| 58 | |||
| 59 | 30 | public function extends(): Definition |
|
| 62 | } |
||
| 63 | } |
||
| 64 |