Optimized checks order in conditions

This commit is contained in:
Alexander Makarov
2015-02-08 17:46:19 +03:00
parent af7ae33d5b
commit 6481d13494
19 changed files with 25 additions and 26 deletions

View File

@ -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);
}
}