Skip to content

Commit

Permalink
Added Travis
Browse files Browse the repository at this point in the history
Fixed usaged in README.md
  • Loading branch information
clphillips committed Jan 7, 2016
1 parent 838ef6b commit 3ec0ff5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 7 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm
before_script:
- composer install --dev
script:
- ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml
- ./vendor/bin/phpcs --extensions=php --report=summary --standard=PSR2 ./src ./tests
after_script:
- php ./vendor/bin/coveralls -v
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
# PhillipsData\Vin
# VIN

[![Build Status](https://travis-ci.org/phillipsdata/vin.svg?branch=master)](https://travis-ci.org/phillipsdata/vin) [![Coverage Status](https://coveralls.io/repos/phillipsdata/vin/badge.svg)](https://coveralls.io/r/phillipsdata/vin)

VIN (Vehicle Identification Number) validation and diagnostic library.

### Features

- Validates North American VIN numbers.
- Returns all possible years of manfacture for North American VIN numbers.
- Returns the country of manufacturer for VINs defined by ISO 3779.
- Supports custom readers for validating VINs outside of North America.

## Installation

Install via composer:

```php
composer require phillipsdata\vin
```sh
composer require phillipsdata/vin
```

## Basic Usage

```php
use PhillipsData\Vin\Number;

$vin = new Number('1M8GDM9AXKP042788);
$vin = new Number('1M8GDM9AXKP042788');

$vin->valid(); // returns whether the VIN is valid
$vin->country(); // returns the ISO 3166 country code for the country of origin
Expand All @@ -27,7 +36,7 @@ $vin->year(); // returns an array of possible manufacturer years
## Advanced Usage

You can supply your own VIN reader. This allows you to implement a VIN reader
for vehicles manufactured in other countries.
for vehicles manufactured in other countries (outside of North America).

```php
use PhillipsData\Vin\Number;
Expand All @@ -45,5 +54,3 @@ implementations for unsupported regions.

We'd also love for this library to support extracting Manufacturer (e.g. Ford, Chevrolet, etc.)
based on the SAE's assignment of world manufacturer identifiers.


0 comments on commit 3ec0ff5

Please sign in to comment.