Skip to content

Commit

Permalink
Satisfy infection (#284)
Browse files Browse the repository at this point in the history
* Satisfy infection

* Updated psalm config
  • Loading branch information
norberttech committed Aug 14, 2022
1 parent 5629261 commit eba5a65
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 63 deletions.
15 changes: 10 additions & 5 deletions infection.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -59,7 +61,8 @@
},
"Plus": {
"ignore": [
"Aeon\\Calendar\\Gregorian\\Year::next"
"Aeon\\Calendar\\Gregorian\\Year::next",
"Aeon\\Calendar\\Gregorian\\Month::addMonths"
]
},
"Ternary": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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_": {
Expand Down
5 changes: 2 additions & 3 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0"?>
<psalm
totallyTyped="true"
resolveFromConfigFile="true"
errorLevel="1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
xsi:schemaLocation="https://getpsalm.org/schema/config tools/vendor/vimeo/psalm/config.xsd"
cacheDirectory="var/psalm/cache"
>
<projectFiles>
Expand Down
2 changes: 1 addition & 1 deletion src/Aeon/Calendar/Gregorian/Quarter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Loading

0 comments on commit eba5a65

Please sign in to comment.