1
0
Fork 0
mirror of synced 2025-04-01 12:26:11 +03:00

Revert "only use already existing reflections"

This reverts commit bb5bdcf0f4.
This commit is contained in:
Adam Prager 2013-03-26 21:17:59 +01:00
parent bb5bdcf0f4
commit 8e3e2e770a

View file

@ -710,13 +710,11 @@ public function __construct()
}
// check traits for existing property
if (isset($this->staticReflection[$metadata->name])) {
$reflClass = $this->staticReflection[$metadata->name];
$reflClass = new \ReflectionClass($metadata->name);
foreach ($reflClass->getTraits() as $trait) {
if ($trait->hasProperty($property)) {
return true;
}
foreach ($reflClass->getTraits() as $trait) {
if ($trait->hasProperty($property)) {
return true;
}
}
@ -744,13 +742,11 @@ public function __construct()
}
// check traits for existing method
if (isset($this->staticReflection[$metadata->name])) {
$reflClass = $this->staticReflection[$metadata->name];
$reflClass = new \ReflectionClass($metadata->name);
foreach ($reflClass->getTraits() as $trait) {
if ($trait->hasMethod($method)) {
return true;
}
foreach ($reflClass->getTraits() as $trait) {
if ($trait->hasMethod($method)) {
return true;
}
}