From eba5a653d4544ee879a9af963d2a04bdbea43577 Mon Sep 17 00:00:00 2001 From: Norbert Orzechowicz <1921950+norberttech@users.noreply.github.com> Date: Sun, 14 Aug 2022 19:09:33 +0200 Subject: [PATCH] Satisfy infection (#284) * Satisfy infection * Updated psalm config --- infection.json | 15 ++-- psalm.xml | 5 +- src/Aeon/Calendar/Gregorian/Quarter.php | 2 +- tools/composer.lock | 109 ++++++++++++------------ 4 files changed, 68 insertions(+), 63 deletions(-) diff --git a/infection.json b/infection.json index 2b6e7c13..96bd8332 100644 --- a/infection.json +++ b/infection.json @@ -21,12 +21,14 @@ "PublicVisibility": { "ignore": [ "Aeon\\Calendar\\Gregorian\\TimeZone::*", - "Aeon\\Calendar\\Gregorian\\GregorianCalendarStub::*" + "Aeon\\Calendar\\Gregorian\\GregorianCalendarStub::*", + "Aeon\\Calendar\\Gregorian\\Day::minus", + "Aeon\\Calendar\\Gregorian\\Day::plus" ] }, "Assignment": { "ignore": [ - "Aeon\\Calendar\\Gregorian\\Month::plusMonths" + "Aeon\\Calendar\\Gregorian\\Month::addMonths" ] }, "MethodCallRemoval": { @@ -59,7 +61,8 @@ }, "Plus": { "ignore": [ - "Aeon\\Calendar\\Gregorian\\Year::next" + "Aeon\\Calendar\\Gregorian\\Year::next", + "Aeon\\Calendar\\Gregorian\\Month::addMonths" ] }, "Ternary": { @@ -129,7 +132,7 @@ "ignore": [ "Aeon\\Calendar\\Gregorian\\DateTime::isAmbiguous", "Aeon\\Calendar\\Gregorian\\DateTime::add", - "Aeon\\Calendar\\Gregorian\\Month::minusMonths" + "Aeon\\Calendar\\Gregorian\\Month::subMonths" ] }, "LessThanOrEqualTo": { @@ -157,7 +160,9 @@ "Aeon\\Calendar\\RelativeTimeUnit::inYears", "Aeon\\Calendar\\RelativeTimeUnit::inCalendarMonths", "Aeon\\Calendar\\Gregorian\\Time::toDateTimeImmutable", - "Aeon\\Calendar\\Gregorian\\DateTime::isAmbiguous" + "Aeon\\Calendar\\Gregorian\\DateTime::isAmbiguous", + "Aeon\\Calendar\\Gregorian\\Month::add", + "Aeon\\Calendar\\Gregorian\\Month::sub" ] }, "Continue_": { diff --git a/psalm.xml b/psalm.xml index 33f2f7e9..08e67606 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,10 +1,9 @@ diff --git a/src/Aeon/Calendar/Gregorian/Quarter.php b/src/Aeon/Calendar/Gregorian/Quarter.php index 1c26287e..1e7c249f 100644 --- a/src/Aeon/Calendar/Gregorian/Quarter.php +++ b/src/Aeon/Calendar/Gregorian/Quarter.php @@ -31,7 +31,7 @@ public function __construct(int $number, Months $months) throw new InvalidArgumentException('Quarter 1 must must have Jan, Feb and Mar'); } - break; + break; case 2: if ($months->map(fn (Month $month) => $month->number()) !== [4, 5, 6]) { throw new InvalidArgumentException('Quarter 2 must must have Apr, May and Jun'); diff --git a/tools/composer.lock b/tools/composer.lock index abe89a1b..39413fe1 100644 --- a/tools/composer.lock +++ b/tools/composer.lock @@ -9,16 +9,16 @@ "packages-dev": [ { "name": "amphp/amp", - "version": "v2.6.1", + "version": "v2.6.2", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae" + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae", - "reference": "c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae", + "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", "shasum": "" }, "require": { @@ -40,13 +40,13 @@ } }, "autoload": { - "psr-4": { - "Amp\\": "lib" - }, "files": [ "lib/functions.php", "lib/Internal/functions.php" - ] + ], + "psr-4": { + "Amp\\": "lib" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -71,7 +71,7 @@ } ], "description": "A non-blocking concurrency framework for PHP applications.", - "homepage": "http://amphp.org/amp", + "homepage": "https://amphp.org/amp", "keywords": [ "async", "asynchronous", @@ -86,7 +86,7 @@ "support": { "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.1" + "source": "https://github.com/amphp/amp/tree/v2.6.2" }, "funding": [ { @@ -94,7 +94,7 @@ "type": "github" } ], - "time": "2021-09-23T18:43:08+00:00" + "time": "2022-02-20T17:52:18+00:00" }, { "name": "amphp/byte-stream", @@ -319,16 +319,16 @@ }, { "name": "composer/semver", - "version": "3.3.1", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "5d8e574bb0e69188786b8ef77d43341222a41a71" + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/5d8e574bb0e69188786b8ef77d43341222a41a71", - "reference": "5d8e574bb0e69188786b8ef77d43341222a41a71", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", "shasum": "" }, "require": { @@ -380,7 +380,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.1" + "source": "https://github.com/composer/semver/tree/3.3.2" }, "funding": [ { @@ -396,7 +396,7 @@ "type": "tidelift" } ], - "time": "2022-03-16T11:22:07+00:00" + "time": "2022-04-01T19:23:25+00:00" }, { "name": "composer/xdebug-handler", @@ -767,16 +767,16 @@ }, { "name": "felixfbecker/language-server-protocol", - "version": "1.5.1", + "version": "v1.5.2", "source": { "type": "git", "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", "shasum": "" }, "require": { @@ -817,22 +817,22 @@ ], "support": { "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" }, - "time": "2021-02-22T14:02:09+00:00" + "time": "2022-03-02T22:36:06+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.8.0", + "version": "v3.9.5", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "cbad1115aac4b5c3c5540e7210d3c9fba2f81fa3" + "reference": "4465d70ba776806857a1ac2a6f877e582445ff36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/cbad1115aac4b5c3c5540e7210d3c9fba2f81fa3", - "reference": "cbad1115aac4b5c3c5540e7210d3c9fba2f81fa3", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/4465d70ba776806857a1ac2a6f877e582445ff36", + "reference": "4465d70ba776806857a1ac2a6f877e582445ff36", "shasum": "" }, "require": { @@ -900,7 +900,7 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.8.0" + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.9.5" }, "funding": [ { @@ -908,7 +908,7 @@ "type": "github" } ], - "time": "2022-03-18T17:20:59+00:00" + "time": "2022-07-22T08:43:51+00:00" }, { "name": "infection/abstract-testframework-adapter", @@ -1215,16 +1215,16 @@ }, { "name": "justinrainbow/json-schema", - "version": "5.2.11", + "version": "5.2.12", "source": { "type": "git", "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", "shasum": "" }, "require": { @@ -1279,9 +1279,9 @@ ], "support": { "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" }, - "time": "2021-07-22T09:24:00+00:00" + "time": "2022-04-13T08:02:27+00:00" }, { "name": "myclabs/deep-copy", @@ -4155,16 +4155,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v5.4.3", + "version": "v5.4.9", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "dec8a9f58d20df252b9cd89f1c6c1530f747685d" + "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/dec8a9f58d20df252b9cd89f1c6c1530f747685d", - "reference": "dec8a9f58d20df252b9cd89f1c6c1530f747685d", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", + "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", "shasum": "" }, "require": { @@ -4220,7 +4220,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.3" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.9" }, "funding": [ { @@ -4236,7 +4236,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-05-05T16:45:39+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -5007,16 +5007,16 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f" + "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", "shasum": "" }, "require": { @@ -5025,7 +5025,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5066,7 +5066,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" }, "funding": [ { @@ -5082,7 +5082,7 @@ "type": "tidelift" } ], - "time": "2021-09-13T13:58:11+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/process", @@ -5568,16 +5568,16 @@ }, { "name": "vimeo/psalm", - "version": "4.20.0", + "version": "4.26.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "f82a70e7edfc6cf2705e9374c8a0b6a974a779ed" + "reference": "6998fabb2bf528b65777bf9941920888d23c03ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/f82a70e7edfc6cf2705e9374c8a0b6a974a779ed", - "reference": "f82a70e7edfc6cf2705e9374c8a0b6a974a779ed", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/6998fabb2bf528b65777bf9941920888d23c03ac", + "reference": "6998fabb2bf528b65777bf9941920888d23c03ac", "shasum": "" }, "require": { @@ -5602,6 +5602,7 @@ "php": "^7.1|^8", "sebastian/diff": "^3.0 || ^4.0", "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", + "symfony/polyfill-php80": "^1.25", "webmozart/path-util": "^2.3" }, "provide": { @@ -5668,9 +5669,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.20.0" + "source": "https://github.com/vimeo/psalm/tree/4.26.0" }, - "time": "2022-02-03T17:03:47+00:00" + "time": "2022-07-31T13:10:26+00:00" }, { "name": "webmozart/assert",