mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 14:28:27 +08:00
Optimized checks order in conditions
This commit is contained in:
@ -113,7 +113,7 @@ class HelpController extends Controller
|
||||
$class = new \ReflectionClass($controller);
|
||||
foreach ($class->getMethods() as $method) {
|
||||
$name = $method->getName();
|
||||
if ($method->isPublic() && !$method->isStatic() && strpos($name, 'action') === 0 && $name !== 'actions') {
|
||||
if ($name !== 'actions' && $method->isPublic() && !$method->isStatic() && strpos($name, 'action') === 0) {
|
||||
$actions[] = Inflector::camel2id(substr($name, 6), '-', true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user