jkoudys / immutable.php

Immutable collections, with filter, map, join, sort, slice, and other methods. Well-suited for functional programming and memory-intensive applications. Runs especially fast in PHP7.
MIT License
346 stars 20 forks source link

Method quickSort uses an undefined variable in return #10

Closed frankvanhest closed 8 years ago

frankvanhest commented 8 years ago

The method quickSort uses an undefined variable in return. Current variable is $imm and it should be $sfa. While you at it, there is still a var_dump in the same method ;-)

jkoudys commented 8 years ago

Thanks @frankvanhest ! The quickSort exists purely as protected so it can be chosen as the default of any child classes (e.g. class Foos extends ImmArray { public function sort(callable $cb = null) { return $this->quickSort($cb);), so I guess not too many people are doing that right now if something I should have fixed from phpcs made it through :)