PHPackages                             vampyrian/lithuanian-phones - 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. vampyrian/lithuanian-phones

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

vampyrian/lithuanian-phones
===========================

Lithuanian phones helper

v1.0.1(1y ago)02MITPHPPHP &gt;=8.1

Since Feb 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Vampyrian/lithuanian-phones)[ Packagist](https://packagist.org/packages/vampyrian/lithuanian-phones)[ RSS](/packages/vampyrian-lithuanian-phones/feed)WikiDiscussions main Synced 1mo ago

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

Vampyrian/lithuanian-phones
===========================

[](#vampyrianlithuanian-phones)

A phone number library for PHP.

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

[](#installation)

This library is installable via [Composer](https://getcomposer.org/):

```
composer require vampyrian/lithuanian-phones
```

Requirements
------------

[](#requirements)

This library requires PHP 8.1 or later.

Quick start
-----------

[](#quick-start)

All the classes lie in the `vampyrian/lithuanian-phones` namespace.

To obtain an instance of `LithuanianPhone`, use the `parse()` method.

### Validating a number

[](#validating-a-number)

The `parse()` method is quite permissive with numbers; it basically attempts to match a country code, and validates the length of the phone number for this country and operator.

If a number is really malformed, it throws a `LithuanianPhoneException`, `LithuanianPhoneLengthException` or `LithuanianPhoneOperatorNotFoundException`:

```
use Vampyrian\LithuanianPhone;
use Vampyrian\LithuanianPhone\Exceptions\LithuanianPhoneException;
use Vampyrian\LithuanianPhone\Exceptions\LithuanianPhoneLengthException;
use Vampyrian\LithuanianPhone\Exceptions\LithuanianPhoneOperatorNotFoundException;

try {
    $number = LithuanianPhone::parse('+370 672 17266');
}
catch (LithuanianPhoneException $e) {
    // 'Code is not correct for lithuania phone number.'
}
catch (LithuanianPhoneLengthException $e) {
    // 'Length is incorrect for lithuania phone number.'
}
catch (LithuanianPhoneOperatorNotFoundException $e) {
    // 'Operator is incorrect.'
}
```

### Formatting a number

[](#formatting-a-number)

You can use `format()` with a `NumberFormatType` enum value:

```
$number = LithuanianPhone::parse('+370 672 17266');
$number->format(NumberFormatType::INTERNATIONAL); // +37067217266
$number->format(NumberFormatType::LOCAL); // 067217266
```

### Number types

[](#number-types)

In certain cases, it is possible to know the type of a phone number (fixed line, mobile phone), and operator:

```
$lithuaniaPhone = LithuanianPhone::parse('(0 427) 00 000');
$parsedOperator = $lithuaniaPhone->getOperator(); // Operator::KELME
$parsedOperatorType = $parsedOperator->getType(); // OperatorType::FIXED

$lithuaniaPhone = LithuanianPhone::parse('0672 17266');
$parsedOperator = $lithuaniaPhone->getOperator(); // Operator::TELE2
$parsedOperatorType = $parsedOperator->getType(); // OperatorType::MOBILE
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance42

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

463d ago

### Community

Maintainers

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

---

Top Contributors

[![Vampyrian](https://avatars.githubusercontent.com/u/17021540?v=4)](https://github.com/Vampyrian "Vampyrian (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vampyrian-lithuanian-phones/health.svg)

```
[![Health](https://phpackages.com/badges/vampyrian-lithuanian-phones/health.svg)](https://phpackages.com/packages/vampyrian-lithuanian-phones)
```

PHPackages © 2026

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