PHPackages                             godwin/tg-phone-operator-checker - 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. godwin/tg-phone-operator-checker

ActiveLibrary

godwin/tg-phone-operator-checker
================================

Valider et trouver le nom l'opérateur togolais d'un numéro de téléphone

1.0.4(3y ago)13MITPHPPHP &gt;=7.4

Since Oct 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/geekabel/TGPhoneOperatorChecker)[ Packagist](https://packagist.org/packages/godwin/tg-phone-operator-checker)[ RSS](/packages/godwin-tg-phone-operator-checker/feed)WikiDiscussions main Synced 1mo ago

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

TG Phone Operator Checker
=========================

[](#tg-phone-operator-checker)

TG Phone Operator Checker is a PHP package that allows you to validate and identify Togolese phone numbers. It provides functionality to clean phone numbers, check their validity, and determine the mobile operator.

Features
--------

[](#features)

- Clean and standardize Togolese phone numbers
- Validate Togolese phone numbers
- Identify the mobile operator (TOGOCOM or MOOV)
- PHP 8.3 compatible

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

[](#installation)

You can install this package via Composer. Run the following command in your project directory:

```
composer require godwin/tg-phone-operator-checker
```

Usage
-----

[](#usage)

Here's a quick example of how to use the TG Phone Operator Checker:

```
use Godwin\TgPhoneOperatorChecker\PhoneOperatorChecker;

// Clean a phone number
$cleanNumber = PhoneOperatorChecker::clean('90123456');
echo $cleanNumber; // Outputs: 22890123456

// Check if a number is valid
$isValid = PhoneOperatorChecker::isValidTogoNumber('22890123456');
echo $isValid ? 'Valid' : 'Invalid'; // Outputs: Valid

// Get the operator for a phone number
$operator = PhoneOperatorChecker::getOperatorName('22890123456');
echo $operator; // Outputs: TOGOCOM
```

### Available Methods

[](#available-methods)

- `clean(string $msisdn): string`: Standardizes the MSISDN format for Togo numbers.
- `checkMSISDNLength(string $msisdn): bool`: Checks if the MSISDN length is valid.
- `channel(string $msisdn): string`: Returns the operator channel (TOGOCOM or MOOV) for a given MSISDN.
- `isValidTogoNumber(string $msisdn): bool`: Checks if the given number is a valid Togo number.
- `getOperatorName(string $msisdn): string`: Returns the operator name for a given MSISDN.

Development
-----------

[](#development)

To set up the project for development:

1. Clone the repository
2. Run `composer install` to install dependencies

### Running Tests

[](#running-tests)

To run the test suite:

```
composer test
```

To generate a code coverage report:

```
composer test-coverage
```

### Code Style

[](#code-style)

This project uses PHP-CS-Fixer for code style. To check your code:

```
composer cs-check
```

To automatically fix code style issues:

```
composer cs-fix
```

### Static Analysis

[](#static-analysis)

Rector is used for automated code upgrades and refactoring. To run Rector:

```
composer rector
```

To see what changes Rector would make without applying them:

```
composer rector-dry-run
```

### All Checks

[](#all-checks)

To run all checks (tests, code style, and Rector):

```
composer check-all
```

To apply all fixes:

```
composer fix-all
```

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

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity5

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

Total

2

Last Release

1154d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bbde8f2b7bec34de0b2c70845989e34b3f9290a57dc800cfc0c01145f565ef0b?d=identicon)[geekabel](/maintainers/geekabel)

---

Top Contributors

[![geekabel](https://avatars.githubusercontent.com/u/33297904?v=4)](https://github.com/geekabel "geekabel (17 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/godwin-tg-phone-operator-checker/health.svg)

```
[![Health](https://phpackages.com/badges/godwin-tg-phone-operator-checker/health.svg)](https://phpackages.com/packages/godwin-tg-phone-operator-checker)
```

PHPackages © 2026

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