| Total Complexity | 8 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Class_ extends Base |
||
| 9 | { |
||
| 10 | function getType(): string |
||
|
|
|||
| 11 | { |
||
| 12 | return FullyQualifiedStructuralElementName::TYPE_CLASS; |
||
| 13 | } |
||
| 14 | |||
| 15 | public function include(Base $that): bool |
||
| 18 | } |
||
| 19 | |||
| 20 | public function isClass(): bool |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getFullyQualifiedNamespaceNameAsArray(): array |
||
| 26 | { |
||
| 27 | $names = $this->getFullyQualifiedClassNameAsArray(); |
||
| 28 | array_pop($names); |
||
| 29 | |||
| 30 | return $names; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getFullyQualifiedClassNameAsArray(): ?array |
||
| 34 | { |
||
| 35 | return explode('\\', substr($this->toString(), 1)); |
||
| 36 | } |
||
| 37 | |||
| 38 | public function createMethodFQSEN(string $methodName): Method |
||
| 39 | { |
||
| 40 | return FullyQualifiedStructuralElementName::createMethod($this->toString(), $methodName); |
||
| 41 | } |
||
| 42 | |||
| 43 | public function createPropertyFQSEN(string $propertyName): Property |
||
| 46 | } |
||
| 47 | |||
| 48 | public function createClassConstantFQSEN(string $constantName): ClassConstant |
||
| 51 | } |
||
| 52 | } |
||
| 53 |
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.