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

Bugfix in short identifier shortcut with association ids

This commit is contained in:
Benjamin Eberlei 2011-10-19 11:58:59 +02:00
parent 7345c795ac
commit ca01065c6a

View file

@ -230,10 +230,12 @@ class ProxyFactory
*/
private function isShortIdentifierGetter($method, $class)
{
$identifier = lcfirst(substr($method->getName(), 3));
return (
$method->getNumberOfParameters() == 0 &&
substr($method->getName(), 0, 3) == "get" &&
in_array(lcfirst(substr($method->getName(), 3)), $class->identifier, true) &&
in_array($identifier, $class->identifier, true) &&
$class->hasField($identifier) &&
(($method->getEndLine() - $method->getStartLine()) <= 4)
);
}