#5914 removed unused conditional inside EntityGenerator
, replaced with array_filter()
instead
This commit is contained in:
parent
5d477cdbbc
commit
0ed18fb062
@ -1267,13 +1267,11 @@ public function __construct(<params>)
|
||||
|
||||
foreach ($metadata->lifecycleCallbacks as $name => $callbacks) {
|
||||
foreach ($callbacks as $callback) {
|
||||
if ($code = $this->generateLifecycleCallbackMethod($name, $callback, $metadata)) {
|
||||
$methods[] = $code;
|
||||
}
|
||||
$methods[] = $this->generateLifecycleCallbackMethod($name, $callback, $metadata);
|
||||
}
|
||||
}
|
||||
|
||||
return implode("\n\n", $methods);
|
||||
return implode("\n\n", array_filter($methods));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user