PHPackages                             kubik/sorter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. kubik/sorter

ActiveLibrary

kubik/sorter
============

Sort library

1.0(7y ago)05BSD-3-ClausePHPPHP &gt;=7.1

Since May 3Pushed 7y agoCompare

[ Source](https://github.com/kubikkk/sorter)[ Packagist](https://packagist.org/packages/kubik/sorter)[ RSS](/packages/kubik-sorter/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Sorting Library
===============

[](#sorting-library)

This is a PHP Sorting Library can sorts array objects from large to small and from small to large.

Installation
------------

[](#installation)

```
$ composer require kubik/sorter

```

Usage
-----

[](#usage)

Sorting from smaller

```
$sorter = new Sorter(new SorterFromSmaller());
print_r($sorter->sort($array));
```

Sorting from large

```
$sorter = new Sorter(new SorterFromLarge());
print_r($sorter->sort($array));
```

Switch startegy sorting

```
$sorter = new Sorter(new SorterFromSmaller());
print_r($sorter->sort($array));
$sorter->setStrategy(new SorterFromLarge());
print_r($sorter->sort($array));
```

License
-------

[](#license)

[![license](https://camo.githubusercontent.com/e39f59f18c324eedeb898bc6f9efabb974f3b63acfcfb70e847532d901fe7329/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f67726565666c61732f64656661756c742d70726f6a6563742e737667)](LICENSE)

This project is released under the terms of the BSD-3-Clause [license](LICENSE).

Copyright (c) 2019, Anton Kubrak

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2569d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/402c6dcc38c50b21fbd4d84b2f167573bda91357a34d05e8c7048dd0f99385eb?d=identicon)[kubikkk](/maintainers/kubikkk)

---

Top Contributors

[![kubikkk](https://avatars.githubusercontent.com/u/49641871?v=4)](https://github.com/kubikkk "kubikkk (13 commits)")

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/kubik-sorter/health.svg)

```
[![Health](https://phpackages.com/badges/kubik-sorter/health.svg)](https://phpackages.com/packages/kubik-sorter)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
