diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 60479d9..f541acc 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -24,11 +24,15 @@ $license->save(); -$config = PhpCsFixer\Config\Factory::fromRuleSet(new PhpCsFixer\Config\RuleSet\Php80($license->header()), [ - 'declare_strict_types' => false, - 'final_class' => false, - 'void_return' => false, -]); +$ruleSet = PhpCsFixer\Config\RuleSet\Php80::create() + ->withHeader($license->header()) + ->withRules(PhpCsFixer\Config\Rules::fromArray([ + 'declare_strict_types' => false, + 'final_class' => false, + 'void_return' => false, + ])); + +$config = PhpCsFixer\Config\Factory::fromRuleSet($ruleSet); $config->getFinder() ->ignoreDotFiles(false) diff --git a/composer.json b/composer.json index 9327e6a..8f58615 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "require-dev": { "ergebnis/composer-normalize": "^2.31.0", "ergebnis/license": "^2.4.0", - "ergebnis/php-cs-fixer-config": "^5.9.2", + "ergebnis/php-cs-fixer-config": "^6.13.0", "fakerphp/faker": "^1.23.0", "infection/infection": "~0.26.19", "phpunit/phpunit": "^9.6.14", diff --git a/composer.lock b/composer.lock index 08f9054..ac8728c 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": "2451613d3dd9654145dfeb9aa425f572", + "content-hash": "cf6fa5625424a5e2b23d3399918cf95b", "packages": [], "packages-dev": [ { @@ -592,82 +592,6 @@ }, "time": "2019-12-04T15:06:13+00:00" }, - { - "name": "doctrine/annotations", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.1" - }, - "time": "2023-02-02T22:02:53+00:00" - }, { "name": "doctrine/deprecations", "version": "1.1.2", @@ -785,84 +709,6 @@ ], "time": "2022-12-30T00:15:36+00:00" }, - { - "name": "doctrine/lexer", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/2.1.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-12-14T08:49:07+00:00" - }, { "name": "ergebnis/composer-normalize", "version": "2.31.0", @@ -1316,34 +1162,38 @@ }, { "name": "ergebnis/php-cs-fixer-config", - "version": "5.9.2", + "version": "6.13.0", "source": { "type": "git", "url": "https://github.com/ergebnis/php-cs-fixer-config.git", - "reference": "98fbbd3878da4bdfd38d2ac3f3aa53061b6fecdd" + "reference": "4fb31c5e812b063ae783c354460558b95b887e95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/php-cs-fixer-config/zipball/98fbbd3878da4bdfd38d2ac3f3aa53061b6fecdd", - "reference": "98fbbd3878da4bdfd38d2ac3f3aa53061b6fecdd", + "url": "https://api.github.com/repos/ergebnis/php-cs-fixer-config/zipball/4fb31c5e812b063ae783c354460558b95b887e95", + "reference": "4fb31c5e812b063ae783c354460558b95b887e95", "shasum": "" }, "require": { + "erickskrauch/php-cs-fixer-custom-fixers": "~1.2.1", "ext-filter": "*", - "friendsofphp/php-cs-fixer": "~3.19.2", - "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + "friendsofphp/php-cs-fixer": "~3.40.0", + "kubawerlos/php-cs-fixer-custom-fixers": "~3.17.0", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" }, "require-dev": { - "ergebnis/composer-normalize": "^2.31.0", - "ergebnis/license": "^2.1.0", + "ergebnis/composer-normalize": "^2.28.3", + "ergebnis/data-provider": "^1.2.0", + "ergebnis/license": "^2.0.0", + "ergebnis/rector-rules": "~0.3.0", "fakerphp/faker": "^1.23.0", - "infection/infection": "~0.26.19", - "phpunit/phpunit": "^9.6.9", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.6.13", "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.17.1", + "rector/rector": "~0.18.11", "symfony/filesystem": "^5.0.0 || ^6.0.0", "symfony/process": "^5.0.0 || ^6.0.0", - "vimeo/psalm": "^5.12.0" + "vimeo/psalm": "^5.16.0" }, "type": "library", "extra": { @@ -1364,16 +1214,80 @@ "authors": [ { "name": "Andreas Möller", - "email": "am@localheinz.com" + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" } ], - "description": "Provides a configuration factory and rule sets for friendsofphp/php-cs-fixer.", + "description": "Provides a configuration factory and rule set factories for friendsofphp/php-cs-fixer.", "homepage": "https://github.com/ergebnis/php-cs-fixer-config", "support": { "issues": "https://github.com/ergebnis/php-cs-fixer-config/issues", + "security": "https://github.com/ergebnis/php-cs-fixer-config/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/php-cs-fixer-config" }, - "time": "2023-06-25T20:29:44+00:00" + "time": "2023-11-30T09:24:19+00:00" + }, + { + "name": "erickskrauch/php-cs-fixer-custom-fixers", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/erickskrauch/php-cs-fixer-custom-fixers.git", + "reference": "6b0e22fd12fb3110f74e34aa6988468a220609bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erickskrauch/php-cs-fixer-custom-fixers/zipball/6b0e22fd12fb3110f74e34aa6988468a220609bf", + "reference": "6b0e22fd12fb3110f74e34aa6988468a220609bf", + "shasum": "" + }, + "require": { + "friendsofphp/php-cs-fixer": "^3", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "ely/php-code-style": "^1", + "ergebnis/composer-normalize": "^2.28", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "phpspec/prophecy": "^1.15", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "phpunitgoodpractices/polyfill": "^1.5", + "phpunitgoodpractices/traits": "^1.9.1", + "symfony/phpunit-bridge": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "ErickSkrauch\\PhpCsFixer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "ErickSkrauch", + "email": "erickskrauch@ely.by" + } + ], + "description": "A set of custom fixers for PHP-CS-Fixer", + "homepage": "https://github.com/erickskrauch/php-cs-fixer-custom-fixers", + "keywords": [ + "Code style", + "php-cs-fixer" + ], + "support": { + "issues": "https://github.com/erickskrauch/php-cs-fixer-custom-fixers/issues", + "source": "https://github.com/erickskrauch/php-cs-fixer-custom-fixers/tree/1.2.1" + }, + "time": "2023-11-16T16:27:33+00:00" }, { "name": "fakerphp/faker", @@ -1607,53 +1521,50 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.19.2", + "version": "v3.40.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "210dd89560edb27a8e0d5086b734ac5b5fd4e0e4" + "reference": "27d2b3265b5d550ec411b4319967ae7cfddfb2e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/210dd89560edb27a8e0d5086b734ac5b5fd4e0e4", - "reference": "210dd89560edb27a8e0d5086b734ac5b5fd4e0e4", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/27d2b3265b5d550ec411b4319967ae7cfddfb2e0", + "reference": "27d2b3265b5d550ec411b4319967ae7cfddfb2e0", "shasum": "" }, "require": { - "composer/semver": "^3.3", + "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.3", - "doctrine/annotations": "^2", - "doctrine/lexer": "^2 || ^3", "ext-json": "*", "ext-tokenizer": "*", "php": "^7.4 || ^8.0", "sebastian/diff": "^4.0 || ^5.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/event-dispatcher": "^5.4 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/options-resolver": "^5.4 || ^6.0", - "symfony/polyfill-mbstring": "^1.27", - "symfony/polyfill-php80": "^1.27", - "symfony/polyfill-php81": "^1.27", - "symfony/process": "^5.4 || ^6.0", - "symfony/stopwatch": "^5.4 || ^6.0" + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.28", + "symfony/polyfill-php80": "^1.28", + "symfony/polyfill-php81": "^1.28", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { + "facile-it/paraunit": "^1.3 || ^2.0", "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^2.0", + "keradus/cli-executor": "^2.1", "mikey179/vfsstream": "^1.6.11", - "php-coveralls/php-coveralls": "^2.5.3", + "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.16", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4", + "phpspec/prophecy": "^1.17", "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5", - "phpunitgoodpractices/polyfill": "^1.6", - "phpunitgoodpractices/traits": "^1.9.2", - "symfony/phpunit-bridge": "^6.2.3", - "symfony/yaml": "^5.4 || ^6.0" + "phpunit/phpunit": "^9.6", + "symfony/phpunit-bridge": "^6.3.8 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -1691,7 +1602,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.19.2" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.40.0" }, "funding": [ { @@ -1699,7 +1610,7 @@ "type": "github" } ], - "time": "2023-06-25T16:42:58+00:00" + "time": "2023-11-26T09:25:53+00:00" }, { "name": "infection/abstract-testframework-adapter", @@ -2076,6 +1987,52 @@ }, "time": "2022-04-13T08:02:27+00:00" }, + { + "name": "kubawerlos/php-cs-fixer-custom-fixers", + "version": "v3.17.0", + "source": { + "type": "git", + "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", + "reference": "bbfb4ff20d148ed9531b1cfc9c9a861faba72b9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/bbfb4ff20d148ed9531b1cfc9c9a861faba72b9a", + "reference": "bbfb4ff20d148ed9531b1cfc9c9a861faba72b9a", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "ext-tokenizer": "*", + "friendsofphp/php-cs-fixer": "^3.22", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6.4 || ^10.0.14" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpCsFixerCustomFixers\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kuba Werłos", + "email": "werlos@gmail.com" + } + ], + "description": "A set of custom fixers for PHP CS Fixer", + "support": { + "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.17.0" + }, + "time": "2023-11-19T12:08:42+00:00" + }, { "name": "localheinz/diff", "version": "1.1.1", @@ -3188,55 +3145,6 @@ }, "time": "2022-12-03T07:47:07+00:00" }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "time": "2021-02-03T23:26:27+00:00" - }, { "name": "psr/container", "version": "2.0.2", @@ -5470,16 +5378,16 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", "shasum": "" }, "require": { @@ -5488,7 +5396,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5529,7 +5437,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, "funding": [ { @@ -5545,7 +5453,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/process", diff --git a/src/Node/Node.php b/src/Node/Node.php index 4b80ae3..3d3f072 100644 --- a/src/Node/Node.php +++ b/src/Node/Node.php @@ -16,7 +16,6 @@ class Node implements NodeInterface use NodeTrait; /** - * @param mixed $value * @param array $children */ public function __construct(