mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Update Object.php
Switch to an early `continue` rather than wrapping contents of `foreach` in an `if` and indenting.
This commit is contained in:
parent
02e31932f8
commit
1bc51a1c39
@ -908,14 +908,16 @@ abstract class SS_Object {
|
||||
$methods = $this->findMethodsFromExtension($extension);
|
||||
if ($methods) {
|
||||
foreach ($methods as $method) {
|
||||
if (isset(self::$extra_methods[$this->class][$method])) {
|
||||
if (!isset(self::$extra_methods[$this->class][$method])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$methodInfo = self::$extra_methods[$this->class][$method];
|
||||
|
||||
if ($methodInfo['property'] === $property && $methodInfo['index'] === $index) {
|
||||
unset(self::$extra_methods[$this->class][$method]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty(self::$extra_methods[$this->class])) {
|
||||
unset(self::$extra_methods[$this->class]);
|
||||
|
Loading…
Reference in New Issue
Block a user