Use variable to call count() less often
parent
68d468d683
commit
50565cb0c8
|
@ -37,8 +37,9 @@ class RuleWatchNode
|
||||||
|
|
||||||
$literals = $rule->getLiterals();
|
$literals = $rule->getLiterals();
|
||||||
|
|
||||||
$this->watch1 = count($literals) > 0 ? $literals[0] : 0;
|
$literalCount = count($literals);
|
||||||
$this->watch2 = count($literals) > 1 ? $literals[1] : 0;
|
$this->watch1 = $literalCount > 0 ? $literals[0] : 0;
|
||||||
|
$this->watch2 = $literalCount > 1 ? $literals[1] : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue