matejkucera / cvop
Library that handles ČVOP format (Číslo oprávnění pro přenos), which is 14 digits long number, used in Czech Republic as a 'password' for moving phone numbers from one operator to another.
1.0.2
2020-01-13 12:20 UTC
Requires
- php: ^7.1
- nesbot/carbon: ^2.0
Requires (Dev)
This package is not auto-updated.
Last update: 2021-11-01 20:50:52 UTC
README
Description
Library that handles ČVOP format (Číslo oprávnění pro přenos), which is 14 digits long number, used in Czech Republic as a "password" for moving phone numbers from one operator to another.
It validates ČVOP format and throws CvopException if something goes wrong.
Depends on nesbot/carbon.
Build & coverage status
Installation
Composer:
composer require matejkucera/cvop
Examples
$cvop = new Cvop(20507297672631);
return $cvop->cvop();
# returns 20507297672631
return $cvop->from();
# returns Carbon instance of free transfer period beginning date
return $cvop->to();
# returns Carbon instance of free transfer period ending date
CvopException
CvopException is throwed when something goes wrong. Error codes are:
- 1: ČVOP is not numeric
- 2: ČVOP is not 14 digits long
- 3: day date is invalid
- 4: month date is invalid
Contact
If you would like to get in touch with me, send me an email to matej.kucera@vse.cz