1
0
Fork 0

Merge pull request #7467 from staabm/less-count

Use variable to call count() less often
pull/7470/head
Rob 2018-07-12 22:08:52 +02:00 committed by GitHub
commit 006c921abd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -37,8 +37,9 @@ class RuleWatchNode
$literals = $rule->getLiterals();
$this->watch1 = count($literals) > 0 ? $literals[0] : 0;
$this->watch2 = count($literals) > 1 ? $literals[1] : 0;
$literalCount = count($literals);
$this->watch1 = $literalCount > 0 ? $literals[0] : 0;
$this->watch2 = $literalCount > 1 ? $literals[1] : 0;
}
/**