only use already existing reflections
This commit is contained in:
parent
521276f1ed
commit
bb5bdcf0f4
@ -710,11 +710,13 @@ public function __construct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check traits for existing property
|
// check traits for existing property
|
||||||
$reflClass = new \ReflectionClass($metadata->name);
|
if (isset($this->staticReflection[$metadata->name])) {
|
||||||
|
$reflClass = $this->staticReflection[$metadata->name];
|
||||||
|
|
||||||
foreach ($reflClass->getTraits() as $trait) {
|
foreach ($reflClass->getTraits() as $trait) {
|
||||||
if ($trait->hasProperty($property)) {
|
if ($trait->hasProperty($property)) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -742,11 +744,13 @@ public function __construct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check traits for existing method
|
// check traits for existing method
|
||||||
$reflClass = new \ReflectionClass($metadata->name);
|
if (isset($this->staticReflection[$metadata->name])) {
|
||||||
|
$reflClass = $this->staticReflection[$metadata->name];
|
||||||
|
|
||||||
foreach ($reflClass->getTraits() as $trait) {
|
foreach ($reflClass->getTraits() as $trait) {
|
||||||
if ($trait->hasMethod($method)) {
|
if ($trait->hasMethod($method)) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user