Codestyle fixed according to @nickl-

This commit is contained in:
Mikhail Vyrtsev 2017-06-29 16:26:47 +03:00
parent c50c27eecb
commit 41658279e8

View file

@ -25,16 +25,14 @@ class Sorted extends AbstractRule
public function validate($input)
{
$count = count($input);
if ($count < 2) {
return true;
}
if ($count < 2)
return true;
for ($i = 1; $i < $count; $i++) {
if (
($this->ascending && ($this->fn)($input[$i]) < ($this->fn)($input[$i - 1]))
|| (!$this->ascending && ($this->fn)($input[$i]) > ($this->fn)($input[$i - 1]))
) {
)
return false;
}
}
return true;
}