PHPackages                             alex\_vasechkin/common-helpers - 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. alex\_vasechkin/common-helpers

ActiveLibrary

alex\_vasechkin/common-helpers
==============================

Some functions that uses in big projects

1.1.1(5y ago)034MITPHPPHP &gt;=7.0.0

Since Apr 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/AlexVasechkin/common-helpers)[ Packagist](https://packagist.org/packages/alex_vasechkin/common-helpers)[ RSS](/packages/alex-vasechkin-common-helpers/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (4)Used By (0)

\#Common helpers

Classes, that helps you write stable code
-----------------------------------------

[](#classes-that-helps-you-write-stable-code)

### Demo

[](#demo)

#### 1. Task: get value from array and check existing, replace default value

[](#1-task-get-value-from-array-and-check-existing-replace-default-value)

```
use Helpers\CommonHelpers as ch;

$dict = [
    'order_id' => '122',
    'delivery_id' => '1'
];

$orderId = (int) ch::getArrayValue('order_id', $dict, 0);
```

#### 2. Task: get first value from array and check that it is not an empty string

[](#2-task-get-first-value-from-array-and-check-that-it-is-not-an-empty-string)

For example if you handle request and wants to handle get/post parameters. It can be received from some filter, which has many values, for example radio group or something like that. And you want to get first value of many values.

```
use Helpers\CommonHelpers as ch;
use Filters\ColorHandler as ColorFilter;

$filters = [];
// var_dump($_GET['filter_colors']);
// after json_decode:
// [
//     0 => 'green',
//     1 => 'blue'
//     ...
// ]
...
// try to convert json format, returns empty array as default value
$filters['colors'] = ch::fromJSON(ch::getArrayValue('filter_colors', $_GET, []));
...
// get first color in colors. Sets empty string as default value
$firstColor = (int) ch::getFirstValue('colors', $filters, '');

// run filter by first color if necessary
if (ch::isFilledString($firstColor)) {
    /** @var FilterHandlerInterface $filter */
    $filterInstance = new ColorFilter();
    $idSet = $filterInstance->runFilter($firstColor);
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Every ~0 days

Total

2

Last Release

1858d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae1733023c2dea6cb76f21f20e1fe5266dda8ba76cccc6dd9bbd0e93f56fddb9?d=identicon)[Alex.Vasechkin](/maintainers/Alex.Vasechkin)

---

Top Contributors

[![AlexVasechkin](https://avatars.githubusercontent.com/u/44292324?v=4)](https://github.com/AlexVasechkin "AlexVasechkin (7 commits)")

### Embed Badge

![Health badge](/badges/alex-vasechkin-common-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/alex-vasechkin-common-helpers/health.svg)](https://phpackages.com/packages/alex-vasechkin-common-helpers)
```

PHPackages © 2026

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