- Fixed missing tags from traits

This commit is contained in:
mcndave committed 2023-11-17 21:59:29 -05:00
1 parent 5f00c2b603
commit 0fcff83eac
2 files changed
+10 -10

No files matched your search

+7 -7
View File
@@ -65,13 +65,13 @@ class ObjectReflection {
if ( $traits = $this->classReflection->getTraits() ) {
foreach($traits as $key => $value) {
$traitTags = static::fromClass($key)->gatherClass(true);
$traitTags = array_merge_recursive($traitTags ?? [], static::fromClass($key)->gatherClass(true));
}
}
if ( $interfaces = $this->classReflection->getInterfaces() ) {
foreach($interfaces as $key => $value) {
$interfaceTags = static::fromClass($key)->gatherClass(true);
$interfaceTags = array_merge_recursive($interfaceTags ?? [], static::fromClass($key)->gatherClass(true));
}
}
@@ -81,11 +81,11 @@ class ObjectReflection {
}
return array_merge_recursive($class ?? [], $traitTags ?? [], $interfaceTags ?? [], [
'tags' => $this->annotationReader->getClass($this->classReflection)
] + ( ! $full ? [] : [
'traits' => array_map($itemName, $traits),
'interfaces' => array_map($itemName, $interfaces),
] ));
'tags' => $this->annotationReader->getClass($this->classReflection)
] + ( ! $full ? [] : [
'traits' => array_map($itemName, $traits),
'interfaces' => array_map($itemName, $interfaces),
] ));
}
public function gatherProperties(bool $full = true, int $filter =