| Total Complexity | 5 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class Function_ extends Base |
||
| 9 | { |
||
| 10 | function getType(): string |
||
|
|
|||
| 11 | { |
||
| 12 | return FullyQualifiedStructuralElementName::TYPE_FUNCTION; |
||
| 13 | } |
||
| 14 | |||
| 15 | public function include(Base $that): bool |
||
| 16 | { |
||
| 17 | return $this->isSame($that); |
||
| 18 | } |
||
| 19 | |||
| 20 | public function isFunction(): bool |
||
| 21 | { |
||
| 22 | return true; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getFullyQualifiedNamespaceNameAsArray(): array |
||
| 26 | { |
||
| 27 | $names = explode('\\', substr($this->toString(), 1)); |
||
| 28 | array_pop($names); |
||
| 29 | |||
| 30 | return $names; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getFullyQualifiedClassNameAsArray(): ?array |
||
| 36 | } |
||
| 37 | } |
||
| 38 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.