diff --git a/.travis.yml b/.travis.yml index 73fb498..1a8cda2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,16 +8,11 @@ cache: matrix: include: - - php: 7.2 + - php: 7.4 env: - CS_CHECK=true - TEST_COVERAGE=true - PHPSTAN=true - - php: 7.3 - env: - - CS_CHECK=false - - TEST_COVERAGE=false - - PHPSTAN=false - php: nightly env: - CS_CHECK=false diff --git a/composer.json b/composer.json index dca242b..394a214 100644 --- a/composer.json +++ b/composer.json @@ -20,14 +20,14 @@ "zendframework/zend-validator": "^2.10" }, "require-dev": { - "infection/infection": "^0.13.4", + "infection/infection": "^0.15.1", "php-coveralls/php-coveralls": "~2.1", - "phpstan/phpstan": "~0.11", - "phpstan/phpstan-strict-rules": "~0.11", - "phpstan/phpstan-phpunit": "~0.11", - "phpunit/phpunit": "^8.0", + "phpstan/phpstan": "~0.12.9", + "phpstan/phpstan-strict-rules": "~0.12.2", + "phpstan/phpstan-phpunit": "~0.12.6", + "phpunit/phpunit": "^8.5.2", "roave/security-advisories": "dev-master", - "zendframework/zend-coding-standard": "~1.0" + "squizlabs/php_codesniffer": "^3.5.3" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 939b6b4..ce67879 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dc0e7e350d794ae9b3b9b080b632e0ac", + "content-hash": "4ecd79f1933b00e7482f4b4504e3dc47", "packages": [ { "name": "container-interop/container-interop", @@ -259,62 +259,6 @@ } ], "packages-dev": [ - { - "name": "composer/ca-bundle", - "version": "1.2.6", - "source": { - "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "47fe531de31fca4a1b997f87308e7d7804348f7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/47fe531de31fca4a1b997f87308e7d7804348f7e", - "reference": "47fe531de31fca4a1b997f87308e7d7804348f7e", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8", - "psr/log": "^1.0", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\CaBundle\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", - "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" - ], - "time": "2020-01-13T10:02:55+00:00" - }, { "name": "composer/xdebug-handler", "version": "1.4.0", @@ -606,44 +550,46 @@ }, { "name": "infection/infection", - "version": "0.13.6", + "version": "0.15.1", "source": { "type": "git", "url": "https://github.com/infection/infection.git", - "reference": "09b4d371d203f7f22dcf1741a3f6c657404fb61e" + "reference": "96c6a3fc5714f96345ecfa27ade6f361adde5ddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infection/infection/zipball/09b4d371d203f7f22dcf1741a3f6c657404fb61e", - "reference": "09b4d371d203f7f22dcf1741a3f6c657404fb61e", + "url": "https://api.github.com/repos/infection/infection/zipball/96c6a3fc5714f96345ecfa27ade6f361adde5ddc", + "reference": "96c6a3fc5714f96345ecfa27ade6f361adde5ddc", "shasum": "" }, "require": { - "composer/xdebug-handler": "^1.3", + "composer/xdebug-handler": "^1.3.3", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "justinrainbow/json-schema": "^5.2", - "nikic/php-parser": "^4.2.1", + "nikic/php-parser": "^4.2.2", "ocramius/package-versions": "^1.2", - "padraic/phar-updater": "^1.0.4", - "php": "^7.1.3", + "php": "^7.2.9", "pimple/pimple": "^3.2", - "sebastian/diff": "^1.4 || ^2.0 || ^3.0", - "symfony/console": "^3.4 || ^4.0", - "symfony/filesystem": "^3.4 || ^4.0", - "symfony/finder": "^3.4 || ^4.0", - "symfony/process": "^3.4 || ^4.0", - "symfony/yaml": "^3.4 || ^4.0", - "webmozart/assert": "^1.3" + "sebastian/diff": "^3.0.2", + "seld/jsonlint": "^1.7", + "symfony/console": "^3.4.29 || ^4.0 || ^5.0", + "symfony/filesystem": "^3.4.29 || ^4.0 || ^5.0", + "symfony/finder": "^3.4.29 || ^4.0 || ^5.0", + "symfony/process": "^3.4.29 || ^4.0 || ^5.0", + "symfony/yaml": "^3.4.29 || ^4.0 || ^5.0", + "thecodingmachine/safe": "^0.1.16", + "webmozart/assert": "^1.3", + "webmozart/path-util": "^2.3" }, "conflict": { - "symfony/console": "=3.4.16 || =4.1.5", - "symfony/process": "3.4.2" + "symfony/console": "=4.1.5" }, "require-dev": { - "helmich/phpunit-json-assert": "^2.1 || ^3.0", - "phpunit/phpunit": "^7.5" + "helmich/phpunit-json-assert": "^3.0", + "phpunit/phpunit": "^8.2.5 <8.4", + "symfony/phpunit-bridge": "^4.3.4 || ^5.0" }, "bin": [ "bin/infection" @@ -681,6 +627,11 @@ "name": "Alexey Kopytko", "email": "alexey@kopytko.com", "homepage": "https://www.alexeykopytko.com" + }, + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], "description": "Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.", @@ -692,7 +643,7 @@ "testing", "unit testing" ], - "time": "2019-08-29T19:22:44+00:00" + "time": "2020-02-06T12:53:30+00:00" }, { "name": "justinrainbow/json-schema", @@ -911,127 +862,6 @@ "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", "time": "2019-07-17T15:49:50+00:00" }, - { - "name": "padraic/humbug_get_contents", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/humbug/file_get_contents.git", - "reference": "dcb086060c9dd6b2f51d8f7a895500307110b7a7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/humbug/file_get_contents/zipball/dcb086060c9dd6b2f51d8f7a895500307110b7a7", - "reference": "dcb086060c9dd6b2f51d8f7a895500307110b7a7", - "shasum": "" - }, - "require": { - "composer/ca-bundle": "^1.0", - "ext-openssl": "*", - "php": "^5.3 || ^7.0 || ^7.1 || ^7.2" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.1", - "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": false - }, - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Humbug\\": "src/" - }, - "files": [ - "src/function.php", - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - }, - { - "name": "Théo Fidry", - "email": "theo.fidry@gmail.com" - } - ], - "description": "Secure wrapper for accessing HTTPS resources with file_get_contents for PHP 5.3+", - "homepage": "https://github.com/padraic/file_get_contents", - "keywords": [ - "download", - "file_get_contents", - "http", - "https", - "ssl", - "tls" - ], - "time": "2018-02-12T18:47:17+00:00" - }, - { - "name": "padraic/phar-updater", - "version": "v1.0.6", - "source": { - "type": "git", - "url": "https://github.com/humbug/phar-updater.git", - "reference": "d01d3b8f26e541ac9b9eeba1e18d005d852f7ff1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/humbug/phar-updater/zipball/d01d3b8f26e541ac9b9eeba1e18d005d852f7ff1", - "reference": "d01d3b8f26e541ac9b9eeba1e18d005d852f7ff1", - "shasum": "" - }, - "require": { - "padraic/humbug_get_contents": "^1.0", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Humbug\\SelfUpdate\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - } - ], - "description": "A thing to make PHAR self-updating easy and secure.", - "keywords": [ - "humbug", - "phar", - "self-update", - "update" - ], - "time": "2018-03-30T12:52:15+00:00" - }, { "name": "phar-io/manifest", "version": "1.0.3", @@ -2905,66 +2735,88 @@ "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-10-03T07:35:21+00:00" }, + { + "name": "seld/jsonlint", + "version": "1.7.2", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "e2e5d290e4d2a4f0eb449f510071392e00e10d19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/e2e5d290e4d2a4f0eb449f510071392e00e10d19", + "reference": "e2e5d290e4d2a4f0eb449f510071392e00e10d19", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "time": "2019-10-24T14:27:39+00:00" + }, { "name": "squizlabs/php_codesniffer", - "version": "2.9.2", + "version": "3.5.4", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745" + "reference": "dceec07328401de6211037abbb18bda423677e26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dceec07328401de6211037abbb18bda423677e26", + "reference": "dceec07328401de6211037abbb18bda423677e26", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": ">=5.1.2" + "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "bin": [ - "scripts/phpcs", - "scripts/phpcbf" + "bin/phpcs", + "bin/phpcbf" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "3.x-dev" } }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" @@ -2976,12 +2828,12 @@ } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", "standards" ], - "time": "2018-11-07T22:31:41+00:00" + "time": "2020-01-30T22:20:29+00:00" }, { "name": "symfony/config", @@ -3049,41 +2901,41 @@ }, { "name": "symfony/console", - "version": "v4.4.4", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f512001679f37e6a042b51897ed24a2f05eba656" + "reference": "91c294166c38d8c0858a86fad76d8c14dc1144c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f512001679f37e6a042b51897ed24a2f05eba656", - "reference": "f512001679f37e6a042b51897ed24a2f05eba656", + "url": "https://api.github.com/repos/symfony/console/zipball/91c294166c38d8c0858a86fad76d8c14dc1144c8", + "reference": "91c294166c38d8c0858a86fad76d8c14dc1144c8", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": "^7.2.5", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", "symfony/service-contracts": "^1.1|^2" }, "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3|>=5", + "symfony/dependency-injection": "<4.4", + "symfony/event-dispatcher": "<4.4", "symfony/lock": "<4.4", - "symfony/process": "<3.3" + "symfony/process": "<4.4" }, "provide": { "psr/log-implementation": "1.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/event-dispatcher": "^4.3", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", "symfony/lock": "^4.4|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/var-dumper": "^4.3|^5.0" + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" }, "suggest": { "psr/log": "For using the console logger", @@ -3094,7 +2946,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -3121,30 +2973,30 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2020-01-25T12:44:29+00:00" + "time": "2020-01-25T15:56:29+00:00" }, { "name": "symfony/filesystem", - "version": "v4.4.4", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "266c9540b475f26122b61ef8b23dd9198f5d1cfd" + "reference": "3afadc0f57cd74f86379d073e694b0f2cda2a88c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/266c9540b475f26122b61ef8b23dd9198f5d1cfd", - "reference": "266c9540b475f26122b61ef8b23dd9198f5d1cfd", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3afadc0f57cd74f86379d073e694b0f2cda2a88c", + "reference": "3afadc0f57cd74f86379d073e694b0f2cda2a88c", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": "^7.2.5", "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -3171,29 +3023,29 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2020-01-21T08:20:44+00:00" + "time": "2020-01-21T08:40:24+00:00" }, { "name": "symfony/finder", - "version": "v4.4.4", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "3a50be43515590faf812fbd7708200aabc327ec3" + "reference": "4176e7cb846fe08f32518b7e0ed8462e2db8d9bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/3a50be43515590faf812fbd7708200aabc327ec3", - "reference": "3a50be43515590faf812fbd7708200aabc327ec3", + "url": "https://api.github.com/repos/symfony/finder/zipball/4176e7cb846fe08f32518b7e0ed8462e2db8d9bb", + "reference": "4176e7cb846fe08f32518b7e0ed8462e2db8d9bb", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -3220,7 +3072,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2020-01-04T13:00:46+00:00" + "time": "2020-01-04T14:08:26+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3399,25 +3251,25 @@ }, { "name": "symfony/process", - "version": "v4.4.4", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "f5697ab4cb14a5deed7473819e63141bf5352c36" + "reference": "f9ffd870f5ac01abec7b2b5e15f904ca9400ecd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/f5697ab4cb14a5deed7473819e63141bf5352c36", - "reference": "f5697ab4cb14a5deed7473819e63141bf5352c36", + "url": "https://api.github.com/repos/symfony/process/zipball/f9ffd870f5ac01abec7b2b5e15f904ca9400ecd1", + "reference": "f9ffd870f5ac01abec7b2b5e15f904ca9400ecd1", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -3444,7 +3296,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2020-01-09T09:50:08+00:00" + "time": "2020-01-09T09:53:06+00:00" }, { "name": "symfony/service-contracts", @@ -3556,27 +3408,27 @@ }, { "name": "symfony/yaml", - "version": "v4.4.4", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "cd014e425b3668220adb865f53bff64b3ad21767" + "reference": "69b44e3b8f90949aee2eb3aa9b86ceeb01cbf62a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/cd014e425b3668220adb865f53bff64b3ad21767", - "reference": "cd014e425b3668220adb865f53bff64b3ad21767", + "url": "https://api.github.com/repos/symfony/yaml/zipball/69b44e3b8f90949aee2eb3aa9b86ceeb01cbf62a", + "reference": "69b44e3b8f90949aee2eb3aa9b86ceeb01cbf62a", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": "^7.2.5", "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/console": "<3.4" + "symfony/console": "<4.4" }, "require-dev": { - "symfony/console": "^3.4|^4.0|^5.0" + "symfony/console": "^4.4|^5.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -3584,7 +3436,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -3611,7 +3463,139 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2020-01-21T11:12:16+00:00" + "time": "2020-01-21T11:12:28+00:00" + }, + { + "name": "thecodingmachine/safe", + "version": "v0.1.16", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/safe.git", + "reference": "4e8f840f0a0a2ea167813c3994a7fc527c3c2182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/4e8f840f0a0a2ea167813c3994a7fc527c3c2182", + "reference": "4e8f840f0a0a2ea167813c3994a7fc527c3c2182", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpstan/phpstan": "^0.10.3", + "squizlabs/php_codesniffer": "^3.2", + "thecodingmachine/phpstan-strict-rules": "^0.10.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.1-dev" + } + }, + "autoload": { + "psr-4": { + "Safe\\": [ + "lib/", + "generated/" + ] + }, + "files": [ + "generated/apache.php", + "generated/apc.php", + "generated/apcu.php", + "generated/array.php", + "generated/bzip2.php", + "generated/classobj.php", + "generated/com.php", + "generated/cubrid.php", + "generated/curl.php", + "generated/datetime.php", + "generated/dir.php", + "generated/eio.php", + "generated/errorfunc.php", + "generated/exec.php", + "generated/fileinfo.php", + "generated/filesystem.php", + "generated/filter.php", + "generated/fpm.php", + "generated/ftp.php", + "generated/funchand.php", + "generated/gmp.php", + "generated/gnupg.php", + "generated/hash.php", + "generated/ibase.php", + "generated/ibmDb2.php", + "generated/iconv.php", + "generated/image.php", + "generated/imap.php", + "generated/info.php", + "generated/ingres-ii.php", + "generated/inotify.php", + "generated/json.php", + "generated/ldap.php", + "generated/libevent.php", + "generated/libxml.php", + "generated/lzf.php", + "generated/mailparse.php", + "generated/mbstring.php", + "generated/misc.php", + "generated/msql.php", + "generated/mssql.php", + "generated/mysql.php", + "generated/mysqli.php", + "generated/mysqlndMs.php", + "generated/mysqlndQc.php", + "generated/network.php", + "generated/oci8.php", + "generated/opcache.php", + "generated/openssl.php", + "generated/outcontrol.php", + "generated/password.php", + "generated/pcntl.php", + "generated/pcre.php", + "generated/pdf.php", + "generated/pgsql.php", + "generated/posix.php", + "generated/ps.php", + "generated/pspell.php", + "generated/readline.php", + "generated/rrd.php", + "generated/sem.php", + "generated/session.php", + "generated/shmop.php", + "generated/simplexml.php", + "generated/sockets.php", + "generated/sodium.php", + "generated/solr.php", + "generated/spl.php", + "generated/sqlsrv.php", + "generated/ssdeep.php", + "generated/ssh2.php", + "generated/stats.php", + "generated/stream.php", + "generated/strings.php", + "generated/swoole.php", + "generated/uodbc.php", + "generated/uopz.php", + "generated/url.php", + "generated/var.php", + "generated/xdiff.php", + "generated/xml.php", + "generated/xmlrpc.php", + "generated/yaml.php", + "generated/yaz.php", + "generated/zip.php", + "generated/zlib.php", + "lib/special_cases.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHP core functions that throw exceptions instead of returning FALSE on error", + "time": "2019-06-25T08:45:33+00:00" }, { "name": "theseer/tokenizer", @@ -3702,33 +3686,50 @@ "time": "2019-11-24T13:36:37+00:00" }, { - "name": "zendframework/zend-coding-standard", - "version": "1.0.0", + "name": "webmozart/path-util", + "version": "2.3.0", "source": { "type": "git", - "url": "https://github.com/zendframework/zend-coding-standard.git", - "reference": "893316d2904e93f1c74c1384b6d7d57778299cb6" + "url": "https://github.com/webmozart/path-util.git", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-coding-standard/zipball/893316d2904e93f1c74c1384b6d7d57778299cb6", - "reference": "893316d2904e93f1c74c1384b6d7d57778299cb6", + "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", "shasum": "" }, "require": { - "squizlabs/php_codesniffer": "^2.7" + "php": ">=5.3.3", + "webmozart/assert": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\PathUtil\\": "src/" + } + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], - "description": "Zend Framework coding standard", - "keywords": [ - "Coding Standard", - "zf" + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } ], - "time": "2016-11-09T21:30:43+00:00" + "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", + "time": "2015-12-17T08:42:14+00:00" } ], "aliases": [], diff --git a/phpcs_ruleset.xml b/phpcs_ruleset.xml index cd18df5..96a97bf 100644 --- a/phpcs_ruleset.xml +++ b/phpcs_ruleset.xml @@ -1,23 +1,31 @@ - - AlexTartan Coding Standard + + Expressive Skeleton coding standard - + + + + - + + + - - + + - + - + + @@ -25,4 +33,14 @@ + + 0 + + + 0 + + + + src + test diff --git a/phpstan.neon b/phpstan.neon index 485f3a4..39f1af2 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,6 +4,7 @@ includes: - vendor/phpstan/phpstan-strict-rules/rules.neon parameters: level: 7 + checkMissingIterableValueType: false paths: - src - test diff --git a/src/Helpers/ArrayHelper.php b/src/Helpers/ArrayHelper.php index 75e07d9..642033a 100644 --- a/src/Helpers/ArrayHelper.php +++ b/src/Helpers/ArrayHelper.php @@ -1,4 +1,5 @@ command .= ' ' . $option; @@ -44,7 +44,7 @@ public function withOption($option, $value = null, $separator = ' '): self return $command; } - public function withArgument($argument): self + public function withArgument(string $argument): self { $command = clone $this; $command->command .= ' ' . escapeshellarg($argument); @@ -76,14 +76,15 @@ public function exec(array &$output = null, int &$returnVar = null): string } /** @codeCoverageIgnore */ - public function shell_exec(): ?string + public function shellExec(): ?string { return shell_exec($this->getFullCommand()); } /** @codeCoverageIgnore */ - public function system(&$returnVar = null): ?string + public function system(int &$returnVar = null): ?string { + /** @var string|false $result */ $result = system($this->getFullCommand(), $returnVar); return $result === false @@ -96,4 +97,4 @@ public function passthru(int &$returnValue = null): void { passthru($this->getFullCommand(), $returnValue); } -} \ No newline at end of file +} diff --git a/src/Helpers/ConsoleHelper.php b/src/Helpers/ConsoleHelper.php index 4ee3461..d82cf82 100644 --- a/src/Helpers/ConsoleHelper.php +++ b/src/Helpers/ConsoleHelper.php @@ -15,7 +15,7 @@ final class ConsoleHelper public const COLOR_ERROR = 'white + red_bg + underline + bold'; /** @var int[] */ - private static $ansiCodes = [ + private static array $ansiCodes = [ 'off' => 0, 'bold' => 1, 'italic' => 3, @@ -43,7 +43,7 @@ final class ConsoleHelper public static function setColor(string $string, string $color): string { - $callback = static function (string $carry, string $item) { + $callback = static function (string $carry, string $item): string { return $carry . "\033[" . self::$ansiCodes[trim($item)] . 'm'; }; diff --git a/src/Helpers/DateHelper.php b/src/Helpers/DateHelper.php index c73dcd7..3a3ff80 100644 --- a/src/Helpers/DateHelper.php +++ b/src/Helpers/DateHelper.php @@ -1,4 +1,5 @@ setValue($object, $value); } - /** @return mixed */ + /** + * @param class-string $className + * + * @return mixed + * + * @throws ReflectionException + */ public static function getPrivatePropertyValue(object $object, string $propertyName, string $className = null) { if ($className === null) { @@ -37,7 +48,11 @@ public static function getPrivatePropertyValue(object $object, string $propertyN return $property->getValue($object); } - /** @return mixed */ + /** + * @return mixed + * + * @throws ReflectionException + */ public static function callPrivateMethod(object $object, string $methodName, array $methodArgs) { $reflection = new ReflectionClass(get_class($object)); @@ -47,7 +62,13 @@ public static function callPrivateMethod(object $object, string $methodName, arr return $method->invokeArgs($object, $methodArgs); } - /** @return int|string */ + /** + * @param class-string $className + * + * @return int|string + * + * @throws ReflectionException + */ public static function getConstant(object $object, string $constantName, string $className = null) { if ($className === null) { diff --git a/src/Helpers/Stream/GeneratorReadStream.php b/src/Helpers/Stream/GeneratorReadStream.php index 780cd58..c4d3fcd 100644 --- a/src/Helpers/Stream/GeneratorReadStream.php +++ b/src/Helpers/Stream/GeneratorReadStream.php @@ -1,4 +1,5 @@