diff --git a/.editorconfig b/.editorconfig index 0ef9c98..2da7375 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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 diff --git a/.gitignore b/.gitignore index d1502b0..c331141 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -vendor/ composer.lock +coverage.xml +vendor/ diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 0000000..be473c8 --- /dev/null +++ b/.scrutinizer.yml @@ -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' diff --git a/.travis.yml b/.travis.yml index a18ff5e..44b7c62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/composer.json b/composer.json index a085d8c..0e8a3d6 100644 --- a/composer.json +++ b/composer.json @@ -1,31 +1,36 @@ { - "name": "sunrise/http-factory", - "description": "Sunrise HTTP factory", - "keywords": ["fenric", "sunrise", "http", "http-factory", "psr-17"], - "homepage": "https://github.com/sunrise-php/http-factory", - "license": "MIT", - "authors": [{ - "name": "Anatoly Fenric", - "email": "anatoly@fenric.ru", - "homepage": "https://anatoly.fenric.ru/" - }], - "require": { - "php": "^7.1", - "sunrise/http-message": "^1.0.9", - "sunrise/http-server-request": "^1.0.5", - "sunrise/stream": "^1.0.15", - "sunrise/uri": "^1.0.19" - }, - "require-dev": { - "phpunit/phpunit": "7.4.3", - "http-interop/http-factory-tests": "^0.5" - }, - "provide": { - "psr/http-factory-implementation": "1.0" - }, - "autoload": { - "psr-4": { - "Sunrise\\Http\\Factory\\": "src/" - } - } + "name": "sunrise/http-factory", + "description": "Sunrise HTTP factory", + "keywords": ["fenric", "sunrise", "http", "http-factory", "psr-17"], + "homepage": "https://github.com/sunrise-php/http-factory", + "license": "MIT", + "authors": [{ + "name": "Anatoly Fenric", + "email": "anatoly@fenric.ru", + "homepage": "https://anatoly.fenric.ru/" + }], + "require": { + "php": "^7.1", + "sunrise/http-message": "^1.0.9", + "sunrise/http-server-request": "^1.0.5", + "sunrise/stream": "^1.0.15", + "sunrise/uri": "^1.0.19" + }, + "require-dev": { + "phpunit/phpunit": "7.4.3", + "http-interop/http-factory-tests": "^0.5" + }, + "provide": { + "psr/http-factory-implementation": "1.0" + }, + "autoload": { + "psr-4": { + "Sunrise\\Http\\Factory\\": "src/" + } + }, + "scripts": { + "test": [ + "phpunit --colors=always --coverage-text" + ] + } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 4fe4571..171b558 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,20 +1,24 @@ - + - - - ./tests/ - - - ./vendor/http-interop/http-factory-tests/test - - - - - - - - - - - + + + ./tests/ + + + ./vendor/http-interop/http-factory-tests/test + + + + + ./src + + + + + + + + + +