Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fenric committed Jan 22, 2019
1 parent f1f4142 commit 53f8acd
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 42 deletions.
16 changes: 14 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
# More info at:
# https://editorconfig.org/

root = true

[*.php]
[*]
charset = utf-8
end_of_line = lf
indent_style = tab
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.php]
indent_style = tab

[*.yml]
indent_size = 2
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
vendor/
composer.lock
coverage.xml
vendor/
13 changes: 13 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
build:
nodes:
analysis:
tests:
override:
- php-scrutinizer-run
coverage:
tests:
override:
- command: 'php vendor/bin/phpunit --coverage-clover coverage.xml'
coverage:
file: 'coverage.xml'
format: 'clover'
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ matrix:
include:
- php: 7.1
- php: 7.2
- php: 7.3
- php: nightly
fast_finish: true

sudo: false

before_install:
- travis_retry composer self-update

install:
- travis_retry composer install --no-interaction --prefer-source --no-suggest

script: vendor/bin/phpunit
script: vendor/bin/phpunit --colors=always --coverage-text
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Build Status](https://api.travis-ci.com/sunrise-php/vin.svg?branch=master)](https://travis-ci.com/sunrise-php/vin)
[![CodeFactor](https://www.codefactor.io/repository/github/sunrise-php/vin/badge)](https://www.codefactor.io/repository/github/sunrise-php/vin)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/sunrise-php/vin/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/sunrise-php/vin/?branch=master)
[![Code Intelligence Status](https://scrutinizer-ci.com/g/sunrise-php/vin/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence)
[![Code Coverage](https://scrutinizer-ci.com/g/sunrise-php/vin/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/sunrise-php/vin/?branch=master)
[![Latest Stable Version](https://poser.pugx.org/sunrise/vin/v/stable?format=flat)](https://packagist.org/packages/sunrise/vin)
[![Total Downloads](https://poser.pugx.org/sunrise/vin/downloads?format=flat)](https://packagist.org/packages/sunrise/vin)
[![License](https://poser.pugx.org/sunrise/vin/license?format=flat)](https://packagist.org/packages/sunrise/vin)
Expand All @@ -18,12 +18,9 @@ composer require sunrise/vin
## How to use

```php
try
{
try {
$vin = new \Sunrise\Vin\Vin('wvwzzz1kz6w612305');
}
catch (\InvalidArgumentException $e)
{
} catch (\InvalidArgumentException $e) {
// It's not a valid VIN
}

Expand Down
55 changes: 30 additions & 25 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
{
"name": "sunrise/vin",
"description": "Sunrise VIN",
"keywords": ["fenric", "sunrise", "vin"],
"homepage": "https://github.com/sunrise-php/vin",
"license": "MIT",
"authors": [{
"name": "Anatoly Fenric",
"email": "anatoly@fenric.ru",
"homepage": "https://anatoly.fenric.ru/"
}],
"require": {
"php": "^7.1"
},
"require-dev": {
"phpunit/phpunit": "7.5.1"
},
"autoload": {
"files": [
"data/manufacturers.php",
"data/regions.php"
],
"psr-4": {
"Sunrise\\Vin\\": "src/"
}
}
"name": "sunrise/vin",
"description": "Sunrise VIN",
"keywords": ["fenric", "sunrise", "vin"],
"homepage": "https://github.com/sunrise-php/vin",
"license": "MIT",
"authors": [{
"name": "Anatoly Fenric",
"email": "anatoly@fenric.ru",
"homepage": "https://anatoly.fenric.ru/"
}],
"require": {
"php": "^7.1"
},
"require-dev": {
"phpunit/phpunit": "7.5.1"
},
"autoload": {
"files": [
"data/manufacturers.php",
"data/regions.php"
],
"psr-4": {
"Sunrise\\Vin\\": "src/"
}
},
"scripts": {
"test": [
"phpunit --colors=always --coverage-text"
]
}
}
15 changes: 10 additions & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true">
<testsuites>
<testsuite name="Sunrise VIN Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<testsuites>
<testsuite name="Sunrise VIN Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>./src</directory>
</whitelist>
</filter>
</phpunit>

0 comments on commit 53f8acd

Please sign in to comment.