PHPackages                             swuppio/ru-ending - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. swuppio/ru-ending

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

swuppio/ru-ending
=================

Endings of russian words

1.0.0(2y ago)04MITPHPPHP &gt;=8.1.0

Since Feb 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/swuppio/ru-ending)[ Packagist](https://packagist.org/packages/swuppio/ru-ending)[ RSS](/packages/swuppio-ru-ending/feed)WikiDiscussions master Synced today

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

Ru Ending
=========

[](#ru-ending)

*This package was made for me, but if you find it useful, I'll be happy if you use it*

It helps to write beautiful endings without any `а(ов)`, `ь(ей)` etc

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

[](#installation)

### Via Composer

[](#via-composer)

```
composer require swuppio/ru-ending

```

Get Started
-----------

[](#get-started)

#### Params description

[](#params-description)

```
get(int $number, array $words = ['Друг', 'Друга', 'Друзей']): array
```

- *int* `$number` - The quantity of items to determine the appropriate word form for
- *array* `$words` - An array of word forms to choose from based on $number. The array should include three elements for singular, dual, and plural forms, respectively

The method returns a string representing the correct word form from `$words` based on the `$number` provided

### Static way

[](#static-way)

```
echo Ending::get(5, ['Полис', 'Полиса', 'Полисов']); // Полисов
```

### Object way

[](#object-way)

```
$words = ['Полис', 'Полиса', 'Полисов'];

$ending = new Ending($words);
echo $ending->formatByNumber(3); // Полиса
```

***Note: `formatByNumber()` is the alias for `get()`***

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

860d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ce5fcbd1d1faaaf59586f52e1215470e23d192f63f2cba41283cedf915b3ccc?d=identicon)[swuppio](/maintainers/swuppio)

---

Top Contributors

[![swuppio](https://avatars.githubusercontent.com/u/5064525?v=4)](https://github.com/swuppio "swuppio (3 commits)")

---

Tags

Endings of russian wordsendings of wordsendings

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/swuppio-ru-ending/health.svg)

```
[![Health](https://phpackages.com/badges/swuppio-ru-ending/health.svg)](https://phpackages.com/packages/swuppio-ru-ending)
```

###  Alternatives

[cornernote/yii2-returnurl

ReturnUrl helper for tab-aware nested redirection in Yii2.

145.8k1](/packages/cornernote-yii2-returnurl)

PHPackages © 2026

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