From fcb0985061fef6ecee9cc2ecca4c85b98e1a2691 Mon Sep 17 00:00:00 2001 From: Petr Parolek Date: Sat, 26 Jun 2021 12:44:02 +0200 Subject: [PATCH] Codestyle: improvements (#30) --- .editorconfig | 16 +++++++ .github/workflows/main.yaml | 18 +++---- codeception.yml | 4 +- composer.json | 93 +++++++++++++++++++------------------ 4 files changed, 74 insertions(+), 57 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..3faf149 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# EditorConfig is awesome: http://EditorConfig.org + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = tab +indent_size = tab +tab_width = 4 + +[{*.json, *.yaml, *.yml, *.md}] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index fa52e07..fc9e3b8 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -6,7 +6,7 @@ on: - ".docs/**" push: branches: - - "master" + - "*" schedule: - cron: "0 8 * * 1" # At 08:00 on Monday @@ -24,8 +24,8 @@ jobs: strategy: matrix: - php-version: ["7.4"] - operating-system: ["ubuntu-latest"] + php-version: [ "7.4" ] + operating-system: [ "ubuntu-latest" ] fail-fast: false steps: @@ -86,8 +86,8 @@ jobs: strategy: matrix: - php-version: ["7.4"] - operating-system: ["ubuntu-latest"] + php-version: [ "7.4" ] + operating-system: [ "ubuntu-latest" ] fail-fast: false steps: @@ -145,8 +145,8 @@ jobs: strategy: matrix: - php-version: ["7.2", "7.3", "7.4"] - operating-system: ["ubuntu-latest"] + php-version: [ "7.2", "7.3", "7.4" ] + operating-system: [ "ubuntu-latest" ] composer-args: [ "" ] include: - php-version: "7.2" @@ -219,8 +219,8 @@ jobs: strategy: matrix: - php-version: ["7.4"] - operating-system: ["ubuntu-latest"] + php-version: [ "7.4" ] + operating-system: [ "ubuntu-latest" ] fail-fast: false if: "github.event_name == 'push'" diff --git a/codeception.yml b/codeception.yml index 4addacf..cc9ebe2 100644 --- a/codeception.yml +++ b/codeception.yml @@ -14,8 +14,8 @@ paths: output: tests/_output extensions: - enabled: - - Codeception\Extension\RunFailed + enabled: + - Codeception\Extension\RunFailed settings: log: true diff --git a/composer.json b/composer.json index 829a6ff..2da0a43 100755 --- a/composer.json +++ b/composer.json @@ -1,48 +1,49 @@ { - "name": "contributte/invoice", - "type": "library", - "description": "Library for easily and quickly creating invoices for customers.", - "license": ["MIT"], - "keywords": [ - "contributte", - "invoice" - ], - "require": { - "php": ">=7.2", - "nette/utils": "^3.0.0", - "setasign/fpdf": "^1.8.0" - }, - "require-dev": { - "codeception/codeception": "^4.1.0", - "codeception/module-asserts": "^1.3.0", - "codeception/module-phpbrowser": "^1.0.0", - "nette/di": "^3.0.0", - "nette/application": "^3.0.0", - "ninjify/qa": "^0.12.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-deprecation-rules": "^0.12", - "phpstan/phpstan-nette": "^0.12" - - }, - "autoload": { - "psr-4": { - "Contributte\\Invoice\\": "src/" - } - }, - "scripts": { - "qa": [ - "linter src tests", - "codesniffer src tests" - ], - "tests": [ - "vendor/bin/codecept run" - ] - }, - "minimum-stability": "RC", - "prefer-stable": true, - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - } + "name": "contributte/invoice", + "type": "library", + "description": "Library for easily and quickly creating invoices for customers.", + "license": [ + "MIT" + ], + "keywords": [ + "contributte", + "invoice" + ], + "require": { + "php": ">=7.2", + "nette/utils": "^3.0.0", + "setasign/fpdf": "^1.8.0" + }, + "require-dev": { + "codeception/codeception": "^4.1.0", + "codeception/module-asserts": "^1.3.0", + "codeception/module-phpbrowser": "^1.0.0", + "nette/di": "^3.0.0", + "nette/application": "^3.0.0", + "ninjify/qa": "^0.12.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-nette": "^0.12" + }, + "autoload": { + "psr-4": { + "Contributte\\Invoice\\": "src/" + } + }, + "scripts": { + "qa": [ + "linter src tests", + "codesniffer src tests" + ], + "tests": [ + "vendor/bin/codecept run" + ] + }, + "minimum-stability": "RC", + "prefer-stable": true, + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + } }