alex-kalanis/simple-vin

Simple checking of Vehicle Identification Numbers

v1.1.0 2024-07-24 18:23 UTC

This package is auto-updated.

Last update: 2024-08-24 18:38:00 UTC


README

Build Status Scrutinizer Code Quality Latest Stable Version Minimum PHP Version Downloads License Code Coverage

This is a set of PHP libraries for Vehicle Identification Numbers.

Ported from .Net library Vin .

PHP installation

composer.phar require alex-kalanis/simple-vin

API usage

// basic vin check
$lib = new \kalanis\simple_vin\SimpleVin(); // can be set via DI, usually no more dependency need
$x = $lib->isValid('11111111111111111'); // true
$m = $lib->getWorldManufacturer('TMP......D.......'); // Skoda Trolleybuses
$y = $lib->getModelYear('TMP......D.......'); // 2013
$k = $lib->restoreChecksumCharacter('1FTKR1AD_APA11957'); // X
$c = $lib->restoreChecksum('1FTKR1AD_APA11957'); // 1FTKR1ADXAPA11957

(Refer to Composer Documentation if you are not familiar with composer)

Sources

Changes

  • v1.0.0 - initial port and refactor with extended tests