feday2/sort

sort array desc and asc

v1.0.1 2019-10-21 12:13 UTC

This package is auto-updated.

Last update: 2025-06-22 01:22:51 UTC


README

Sort array using Strategy Pattern

Installation

$ composer require feday2/sort

Usage

<?php

use Feday2\Sort\{Sorted, SortDesc};

...

$sortType = new SortDesc();
$sorter =  new Sorter($sortType);
$sortedArray = $sorter->sort($array);