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

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

garydavisonos/conditional-helpers
=================================

A collection of helper functions to be used in conditional logic

2.0.1(1y ago)1122MITPHPPHP ^8.3

Since Mar 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/garydavisonos/conditional-helpers-php)[ Packagist](https://packagist.org/packages/garydavisonos/conditional-helpers)[ RSS](/packages/garydavisonos-conditional-helpers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Conditional Helpers PHP
=======================

[](#conditional-helpers-php)

A collection of PHP helper functions to be used in conditional logic within projects.

[![Version](https://camo.githubusercontent.com/4631d61246db7b516b7e0ff5fd6743a3ee15d1205b1f31ce5921aef7ea8f37fd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6761727964617669736f6e6f732f636f6e646974696f6e616c2d68656c70657273)](https://camo.githubusercontent.com/4631d61246db7b516b7e0ff5fd6743a3ee15d1205b1f31ce5921aef7ea8f37fd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6761727964617669736f6e6f732f636f6e646974696f6e616c2d68656c70657273)[![License](https://camo.githubusercontent.com/5d48eb34b604ee35518c18bfd42d71a4a67ac51c04b396028dea0e7afbf0fa37/68747470733a2f2f706f7365722e707567782e6f72672f6761727964617669736f6e6f732f636f6e646974696f6e616c2d68656c706572732f6c6963656e7365)](https://camo.githubusercontent.com/5d48eb34b604ee35518c18bfd42d71a4a67ac51c04b396028dea0e7afbf0fa37/68747470733a2f2f706f7365722e707567782e6f72672f6761727964617669736f6e6f732f636f6e646974696f6e616c2d68656c706572732f6c6963656e7365)[![Dependencies](https://camo.githubusercontent.com/2e1abe5489c6480b0f6172097335f32ece2b517a0950f3109963434f153b8f3d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f6761727964617669736f6e6f732f636f6e646974696f6e616c2d68656c706572732f706870)](https://camo.githubusercontent.com/2e1abe5489c6480b0f6172097335f32ece2b517a0950f3109963434f153b8f3d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f6761727964617669736f6e6f732f636f6e646974696f6e616c2d68656c706572732f706870)

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Functions](#functions)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)

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

[](#installation)

To use these conditional helpers, simply install the package via Composer:

```
composer require garydavisonos/conditional-helpers
```

Functions
---------

[](#functions)

The following helper functions are available:

```
isArrayHasLength($array): Checks if an array has a length greater than zero.
isStringHasLength($string): Checks if a string has a length greater than zero.
isBooleanTrue($boolean): Checks if a value is a boolean true.
isBooleanFalse($boolean): Checks if a value is a boolean false.
```

Usage
-----

[](#usage)

Check if an array has a length greater than zero:

```
use GaryDavisonOs\ConditionalHelpers\ConditionalHelpers as Helpers;

$array = [1, 2, 3];
$result = Helpers::isArrayHasLength($array); // Returns true
```

Check if a string has a length greater than zero

```
use GaryDavisonOs\ConditionalHelpers\ConditionalHelpers as Helpers;

$string = "Hello, World!";
$result = Helpers::isStringHasLength($string); // Returns true
```

Check if a value is a boolean true

```
use GaryDavisonOs\ConditionalHelpers\ConditionalHelpers as Helpers;

$boolean = true;
$result = Helpers::isBooleanTrue($boolean); // Returns true
```

Contributing
------------

[](#contributing)

Contributions are welcome! If you'd like to add a new helper function or improve an existing one, please submit a pull request.

License
-------

[](#license)

This package is licensed under the MIT License.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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 ~163 days

Total

3

Last Release

524d ago

Major Versions

1.0.0 → 2.0.02025-01-25

PHP version history (2 changes)1.0.0PHP ^8.0

2.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/59c5910c9ebdc021ddcb74e3441c814965ee13d8a556f8579750eb7f37f0b929?d=identicon)[garydavisonos](/maintainers/garydavisonos)

---

Top Contributors

[![garydavisonos](https://avatars.githubusercontent.com/u/3521929?v=4)](https://github.com/garydavisonos "garydavisonos (26 commits)")

---

Tags

php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/garydavisonos-conditional-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/garydavisonos-conditional-helpers/health.svg)](https://phpackages.com/packages/garydavisonos-conditional-helpers)
```

###  Alternatives

[sunrise/hydrator

A flexible strictly-typed hydrator.

2133.1k6](/packages/sunrise-hydrator)

PHPackages © 2026

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