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