Sylius/SyliusAssortmentBundle — comment on commit 1aece260248bd4fd1971e6b9425a2f3890ed7a35
File: Sorting/ORM/ProductSorter.php line 26
By pjedrzejewski:

W dniu 24.01.2012 15:06, umpirsky pisze:
> Why not this way:
>
> `public function sort(QueryBuilder $sortable)`
>
> and avoid checking instance and throwing exception.
>
> It is more readable IMO and this kind of error should be caught in tests.
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/Sylius/SyliusAssortmentBundle/commit/1aece260248bd4fd1971e6b9425a2f3890ed7a35#commitcomment-896184
Because the sorter interface is more general, it can be implemented for
MongoDB driver or any other driver.
Only in ORM driver the sortable must be *QueryBuilder* instance.
The whole grid/sorting/filtering will be moved to separate bundle,
*SyliusGridBundle* or smth like that.