protected function sort(array &$files, $sort, $order)
    {
        $sorters = $this->getSorters();

        if (isset($sorters[$sort]['handlers']['sort'])) {
            $function = $sorters[$sort]['handlers']['sort'];
            // Suppress errors, see https://bugs.php.net/bug.php?id=50688
            @uasort($files, function ($a, $b) use ($function, $order) {
                return $function($a, $b, $order);
            });
        }
    }