PHPackages                             koteeki/yii2-clearoutphone - 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. koteeki/yii2-clearoutphone

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

koteeki/yii2-clearoutphone
==========================

Yii2 ClearoutPhone extension

1.0.0(6y ago)02PHPPHP ^7.2

Since Jan 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/koteeki/yii2-clearoutphone)[ Packagist](https://packagist.org/packages/koteeki/yii2-clearoutphone)[ RSS](/packages/koteeki-yii2-clearoutphone/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (2)Used By (0)

Global Phone Number Validation Service using ClearoutPhone's API
================================================================

[](#global-phone-number-validation-service-using-clearoutphones-api)

A Yii2 extension to use the ClearoutPhone API. Supported countries:

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run:

```
php composer.phar require --prefer-dist "koteeki/yii2-clearoutphone":"@dev"

```

or add:

```
"koteeki/yii2-clearoutphone": "@dev"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

- Get ClearoutPhone API token:
- Add the following code to your application configuration:

```
return [
    'components' => [
        'clearoutphone' => [
            'class' => \koteeki\clearoutphone\ClearoutPhone::class,
            'token' => 'YOUR_TOKEN_HERE',
            'timeout' => 5000,
        ],
    ],
];
```

- You can now access the extension via `\Yii::$app->clearoutphone`

Methods
-------

[](#methods)

- **`getCredits()`** - get to know the available credits.
- **`getPhoneDetails(string $number, string $countryCode = null)`** - validates phone the number, returns `PhoneNumberDetails`.

Exceptions
----------

[](#exceptions)

The methods above throw exception due to a phone number validation failed:

- `BadRequestException` - validation failed due to a request error,
- `PaymentRequiredException` - you have exhausted your credits,
- `ServiceUnavailable` - the service is unavailable,
- `TimeoutException` - timeout occurred,
- `UnauthorizedException` - token is invalid,
- `ClearoutPhoneException` - an unknown error.

Example
-------

[](#example)

```
use koteeki\clearoutphone\ClearoutPhone;
use koteeki\clearoutphone\exceptions\ClearoutPhoneException;

try {
    /** @var ClearoutPhone $clearout */
    $clearout = \Yii::$app->clearoutphone;
    $phoneDetails = $clearout->getPhoneDetails('+13024401582');
    if ($phoneDetails->isValid) {
        // your magic here
    }
} catch (ClearoutPhoneException $e) {
    Yii::error($e->getMessage());
}
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

2297d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/18fc9261e9e73f29f65995a4707dc27f465d5b41f7038137cb0635a86e9e8e32?d=identicon)[v.ilinyh](/maintainers/v.ilinyh)

---

Tags

yii2clearoutphone

### Embed Badge

![Health badge](/badges/koteeki-yii2-clearoutphone/health.svg)

```
[![Health](https://phpackages.com/badges/koteeki-yii2-clearoutphone/health.svg)](https://phpackages.com/packages/koteeki-yii2-clearoutphone)
```

PHPackages © 2026

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