Update CustomMethods.php

Switch to an early `continue` rather than wrapping contents of `foreach` in an `if` and indenting.
This commit is contained in:
Joe Chenevey 2019-01-08 15:24:21 -05:00 committed by GitHub
parent afceccb9a6
commit 3730d84d18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -279,12 +279,12 @@ trait CustomMethods
$methods = $this->findMethodsFromExtension($extension);
if ($methods) {
foreach ($methods as $method) {
if (isset(self::$extra_methods[$class][$method])) {
$methodInfo = self::$extra_methods[$class][$method];
if (!isset(self::$extra_methods[$class][$method])) continue;
$methodInfo = self::$extra_methods[$class][$method];
if ($methodInfo['property'] === $property && $methodInfo['index'] === $index) {
unset(self::$extra_methods[$class][$method]);
}
if ($methodInfo['property'] === $property && $methodInfo['index'] === $index) {
unset(self::$extra_methods[$class][$method]);
}
}