diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 0000000..33b5676 --- /dev/null +++ b/.scrutinizer.yml @@ -0,0 +1,21 @@ +filter: + excluded_paths: [tests/*] + +checks: + php: + remove_extra_empty_lines: true + remove_php_closing_tag: true + remove_trailing_whitespace: true + fix_use_statements: + remove_unused: true + preserve_multiple: false + preserve_blanklines: true + order_alphabetically: true + fix_php_opening_tag: true + fix_linefeed: true + fix_line_ending: true + fix_identation_4spaces: true + fix_doc_comments: true + +tools: + external_code_coverage: true \ No newline at end of file diff --git a/.styleci.yml b/.styleci.yml new file mode 100644 index 0000000..0285f17 --- /dev/null +++ b/.styleci.yml @@ -0,0 +1 @@ +preset: laravel diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b3b105a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,21 @@ +language: php + +php: + - 8.1 + +env: + matrix: + - COMPOSER_FLAGS="--prefer-lowest" + - COMPOSER_FLAGS="" + +before_script: + - travis_retry composer self-update + - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source + +script: + - composer validate + - composer test:coverage + +after_script: + - wget https://scrutinizer-ci.com/ocular.phar + - php ocular.phar code-coverage:upload --format=php-clover coverage.clover diff --git a/CHANGELOG.md b/CHANGELOG.md index 52eca8c..751c633 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,4 +8,4 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed features -Rename method names for permission driver \ No newline at end of file +Rename method names for permission driver diff --git a/README.md b/README.md index 5d92630..785c9a2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ ## Contents +[![Latest Version on Packagist](https://img.shields.io/packagist/v/macellan/iys.svg?style=flat-square)](https://packagist.org/packages/macellan/onesignal) +[![Build Status](https://scrutinizer-ci.com/g/macellan/iys/badges/build.png?b=main)](https://scrutinizer-ci.com/g/macellan/iys/build-status/main) +[![StyleCI](https://github.styleci.io/repos/463069750/shield?branch=main)](https://github.styleci.io/repos/463069750?branch=main) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/macellan/iys/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/macellan/iys/?branch=main) +[![Code Coverage](https://scrutinizer-ci.com/g/macellan/iys/badges/coverage.png?b=main)](https://scrutinizer-ci.com/g/macellan/iys/?branch=main) +[![Total Downloads](https://img.shields.io/packagist/dt/macellan/iys.svg?style=flat-square)](https://packagist.org/packages/macellan/iys) + - [Installation](#installation) - [Setting up the Iys service](#setting-up-the-IYS-service) - [Enums](#enums) diff --git a/composer.json b/composer.json index 0c7f14d..434eba4 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,8 @@ "scripts": { "test": "vendor/bin/phpunit", "check-style": "phpcs -p --standard=PSR12 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests", - "fix-style": "phpcbf -p --standard=PSR12 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests" + "fix-style": "phpcbf -p --standard=PSR12 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests", + "test:coverage": "vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover" }, "config": { "sort-packages": true,