Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Update some code with rector.
James Coleadba36046620
diff --git a/.ci/rector.php b/.ci/rector.phpindex 7c9ac6c6df..1a6971352b 100644--- a/.ci/rector.php+++ b/.ci/rector.php@@ -34,16 +34,17 @@ return RectorConfig::configure()ChangeOrIfContinueToMultiContinueRector::class,StringToClassConstantRector::class => [__DIR__ . '/../app/Http/Controllers/Auth/LoginController.php',- ]+ ],+ __DIR__.'/../bootstrap/cache/*'])->withPaths([__DIR__ . '/../app',-// __DIR__ . '/../bootstrap',-// __DIR__ . '/../config',-// __DIR__ . '/../public',-// __DIR__ . '/../resources/lang/en_US',-// __DIR__ . '/../routes',-// __DIR__ . '/../tests',+ __DIR__ . '/../bootstrap',+ __DIR__ . '/../config',+ __DIR__ . '/../public',+ __DIR__ . '/../resources/lang/en_US',+ __DIR__ . '/../routes',+ __DIR__ . '/../tests',])->withSets([LaravelLevelSetList::UP_TO_LARAVEL_120,diff --git a/tests/integration/Support/Models/BillDateCalculatorTest.php b/tests/integration/Support/Models/BillDateCalculatorTest.phpindex 1164fce606..d8206c714a 100644--- a/tests/integration/Support/Models/BillDateCalculatorTest.php+++ b/tests/integration/Support/Models/BillDateCalculatorTest.php@@ -56,7 +56,7 @@ final class BillDateCalculatorTest extends TestCasepublic function testGivenSomeDataItWorks(Carbon $earliest, Carbon $latest, Carbon $billStart, string $period, int $skip, ?Carbon $lastPaid, array $expected): void{$result = $this->calculator->getPayDates($earliest, $latest, $billStart, $period, $skip, $lastPaid);- self::assertSame($expected, $result);+ $this->assertSame($expected, $result);}public static function provideDates(): Iteratordiff --git a/tests/integration/Support/NavigationCustomEndOfPeriodTest.php b/tests/integration/Support/NavigationCustomEndOfPeriodTest.phpindex 18a4166646..16102bc7fc 100644--- a/tests/integration/Support/NavigationCustomEndOfPeriodTest.php+++ b/tests/integration/Support/NavigationCustomEndOfPeriodTest.php@@ -45,6 +45,6 @@ final class NavigationCustomEndOfPeriodTest extends TestCase$navigation = new Navigation();$period = $navigation->endOfPeriod($from, 'custom');- self::assertSame($expected->toDateString(), $period->toDateString());+ $this->assertSame($expected->toDateString(), $period->toDateString());}}diff --git a/tests/unit/Support/Calendar/CalculatorTest.php b/tests/unit/Support/Calendar/CalculatorTest.phpindex ec2be998c9..d6d9677361 100644--- a/tests/unit/Support/Calendar/CalculatorTest.php+++ b/tests/unit/Support/Calendar/CalculatorTest.php@@ -73,7 +73,7 @@ final class CalculatorTest extends TestCase{$calculator = new Calculator();$period = $calculator->nextDateByInterval($provider->epoch(), $provider->periodicity);- self::assertSame($provider->expected()->toDateString(), $period->toDateString());+ $this->assertSame($provider->expected()->toDateString(), $period->toDateString());}public static function provideAllPeriodicity(): iterable@@ -102,7 +102,7 @@ final class CalculatorTest extends TestCase{$calculator = new Calculator();$period = $calculator->nextDateByInterval($provider->epoch(), $provider->periodicity, $provider->skip);- self::assertSame($provider->expected()->toDateString(), $period->toDateString());+ $this->assertSame($provider->expected()->toDateString(), $period->toDateString());}public static function provideSkippedIntervals(): iterablediff --git a/tests/unit/Support/Calendar/Periodicity/IntervalTestCase.php b/tests/unit/Support/Calendar/Periodicity/IntervalTestCase.phpindex 7a67095366..0654ab3247 100644--- a/tests/unit/Support/Calendar/Periodicity/IntervalTestCase.php+++ b/tests/unit/Support/Calendar/Periodicity/IntervalTestCase.php@@ -36,7 +36,7 @@ abstract class IntervalTestCase extends TestCasepublic function testGivenAnEpochWhenCallTheNextDateThenReturnsTheExpectedDateSuccessful(IntervalProvider $provider): void{$period = static::factory()->nextDate($provider->epoch);- self::assertSame($provider->expected->toDateString(), $period->toDateString());+ $this->assertSame($provider->expected->toDateString(), $period->toDateString());}public static function provider(): iterablediff --git a/tests/unit/Support/NavigationAddPeriodTest.php b/tests/unit/Support/NavigationAddPeriodTest.phpindex e492584c50..1c13a557b4 100644--- a/tests/unit/Support/NavigationAddPeriodTest.php+++ b/tests/unit/Support/NavigationAddPeriodTest.php@@ -56,7 +56,7 @@ final class NavigationAddPeriodTest extends TestCasepublic function testGivenAFrequencyAndSkipIntervalWhenCalculateTheDateThenReturnsTheSkippedDateSuccessful(int $skip, string $frequency, Carbon $from, Carbon $expected): void{$period = $this->navigation->addPeriod($from, $frequency, $skip);- self::assertSame($expected->toDateString(), $period->toDateString());+ $this->assertSame($expected->toDateString(), $period->toDateString());}public static function providePeriodsWithSkippingParam(): iterable@@ -108,7 +108,7 @@ final class NavigationAddPeriodTest extends TestCasepublic function testGivenAFrequencyWhenCalculateTheDateThenReturnsTheExpectedDateSuccessful(string $frequency, Carbon $from, Carbon $expected): void{$period = $this->navigation->addPeriod($from, $frequency, 0);- self::assertSame($expected->toDateString(), $period->toDateString());+ $this->assertSame($expected->toDateString(), $period->toDateString());}public static function providePeriods(): Iterator@@ -158,7 +158,7 @@ final class NavigationAddPeriodTest extends TestCasepublic function testGivenAIntervalWhenCallTheNextDateByIntervalMethodThenReturnsTheExpectedDateSuccessful(Periodicity $periodicity, Carbon $from, Carbon $expected): void{$period = $this->navigation->nextDateByInterval($from, $periodicity);- self::assertSame($expected->toDateString(), $period->toDateString());+ $this->assertSame($expected->toDateString(), $period->toDateString());}public static function provideFrequencies(): Iterator@@ -212,7 +212,7 @@ final class NavigationAddPeriodTest extends TestCasepublic function testGivenAMonthFrequencyWhenCalculateTheDateThenReturnsTheLastDayOfMonthSuccessful(string $frequency, Carbon $from, Carbon $expected): void{$period = $this->navigation->addPeriod($from, $frequency, 0);- self::assertSame($expected->toDateString(), $period->toDateString());+ $this->assertSame($expected->toDateString(), $period->toDateString());}public static function provideMonthPeriods(): Iteratordiff --git a/tests/unit/Support/NavigationEndOfPeriodTest.php b/tests/unit/Support/NavigationEndOfPeriodTest.phpindex f76bb84be9..4e8ccea578 100644--- a/tests/unit/Support/NavigationEndOfPeriodTest.php+++ b/tests/unit/Support/NavigationEndOfPeriodTest.php@@ -55,7 +55,7 @@ final class NavigationEndOfPeriodTest extends TestCasepublic function testGivenADateAndFrequencyWhenCalculateTheDateThenReturnsTheExpectedDateSuccessful(string $frequency, Carbon $from, Carbon $expected): void{$period = clone $this->navigation->endOfPeriod($from, $frequency);- self::assertSame($expected->toDateString(), $period->toDateString());+ $this->assertSame($expected->toDateString(), $period->toDateString());}public static function provideDates(): Iterator@@ -116,7 +116,7 @@ final class NavigationEndOfPeriodTest extends TestCaseLog::spy();$period = $this->navigation->endOfPeriod($from, $frequency);- self::assertSame($expected->toDateString(), $period->toDateString());+ $this->assertSame($expected->toDateString(), $period->toDateString());$expectedMessage = sprintf('Cannot do endOfPeriod for $repeat_freq "%s"', $frequency);Log::shouldHaveReceived('error', [$expectedMessage]);diff --git a/tests/unit/Support/NavigationPreferredCarbonFormatByPeriodTest.php b/tests/unit/Support/NavigationPreferredCarbonFormatByPeriodTest.phpindex 6f25d44beb..76a8dc54ba 100644--- a/tests/unit/Support/NavigationPreferredCarbonFormatByPeriodTest.php+++ b/tests/unit/Support/NavigationPreferredCarbonFormatByPeriodTest.php@@ -54,7 +54,7 @@ final class NavigationPreferredCarbonFormatByPeriodTest extends TestCasepublic function testGivenAPeriodWhenCallPreferredCarbonFormatByPeriodThenReturnsExpectedFormat(string $period, string $expected): void{$formatPeriod = $this->navigation->preferredCarbonFormatByPeriod($period);- self::assertSame($expected, $formatPeriod);+ $this->assertSame($expected, $formatPeriod);}public static function providePeriods(): Iteratordiff --git a/tests/unit/Support/NavigationPreferredCarbonFormatTest.php b/tests/unit/Support/NavigationPreferredCarbonFormatTest.phpindex 01f06aad2b..3584a98c2a 100644--- a/tests/unit/Support/NavigationPreferredCarbonFormatTest.php+++ b/tests/unit/Support/NavigationPreferredCarbonFormatTest.php@@ -55,7 +55,7 @@ final class NavigationPreferredCarbonFormatTest extends TestCasepublic function testGivenStartAndEndDatesWhenCallPreferredCarbonFormatThenReturnsTheExpectedFormatSuccessful(Carbon $start, Carbon $end, string $expected): void{$carbonFormat = $this->navigation->preferredCarbonFormat($start, $end);- self::assertSame($expected, $carbonFormat);+ $this->assertSame($expected, $carbonFormat);}public static function providePeriods(): Iteratordiff --git a/tests/unit/Support/NavigationPreferredEndOfPeriodTest.php b/tests/unit/Support/NavigationPreferredEndOfPeriodTest.phpindex 95bf81b575..4d0f22e3e7 100644--- a/tests/unit/Support/NavigationPreferredEndOfPeriodTest.php+++ b/tests/unit/Support/NavigationPreferredEndOfPeriodTest.php@@ -55,7 +55,7 @@ final class NavigationPreferredEndOfPeriodTest extends TestCasepublic function testGivenStartAndEndDatesWhenCallPreferredEndOfPeriodThenReturnsTheExpectedFormatSuccessful(Carbon $start, Carbon $end, string $expected): void{$formatPeriod = $this->navigation->preferredEndOfPeriod($start, $end);- self::assertSame($expected, $formatPeriod);+ $this->assertSame($expected, $formatPeriod);}public static function providePeriods(): Iteratordiff --git a/tests/unit/Support/NavigationPreferredRangeFormatTest.php b/tests/unit/Support/NavigationPreferredRangeFormatTest.phpindex 6c0eff7d07..7218e59db2 100644--- a/tests/unit/Support/NavigationPreferredRangeFormatTest.php+++ b/tests/unit/Support/NavigationPreferredRangeFormatTest.php@@ -55,7 +55,7 @@ final class NavigationPreferredRangeFormatTest extends TestCasepublic function testGivenStartAndEndDatesWhenCallPreferredRangeFormatThenReturnsTheExpectedFormatSuccessful(Carbon $start, Carbon $end, string $expected): void{$formatPeriod = $this->navigation->preferredRangeFormat($start, $end);- self::assertSame($expected, $formatPeriod);+ $this->assertSame($expected, $formatPeriod);}public static function providePeriods(): Iteratordiff --git a/tests/unit/Support/NavigationPreferredSqlFormatTest.php b/tests/unit/Support/NavigationPreferredSqlFormatTest.phpindex fa44b76178..4a8fa37420 100644--- a/tests/unit/Support/NavigationPreferredSqlFormatTest.php+++ b/tests/unit/Support/NavigationPreferredSqlFormatTest.php@@ -55,7 +55,7 @@ final class NavigationPreferredSqlFormatTest extends TestCasepublic function testGivenStartAndEndDatesWhenCallPreferredSqlFormatThenReturnsTheExpectedFormatSuccessful(Carbon $start, Carbon $end, string $expected): void{$formatPeriod = $this->navigation->preferredSqlFormat($start, $end);- self::assertSame($expected, $formatPeriod);+ $this->assertSame($expected, $formatPeriod);}public static function provideDates(): Iteratordiff --git a/tests/unit/Support/NavigationStartOfPeriodTest.php b/tests/unit/Support/NavigationStartOfPeriodTest.phpindex ffe2514683..288aa7ecc4 100644--- a/tests/unit/Support/NavigationStartOfPeriodTest.php+++ b/tests/unit/Support/NavigationStartOfPeriodTest.php@@ -56,7 +56,7 @@ final class NavigationStartOfPeriodTest extends TestCasepublic function testGivenADateAndFrequencyWhenCalculateTheDateThenReturnsTheExpectedDateSuccessful(string $frequency, Carbon $from, Carbon $expected): void{$period = $this->navigation->startOfPeriod($from, $frequency);- self::assertSame($expected->toDateString(), $period->toDateString());+ $this->assertSame($expected->toDateString(), $period->toDateString());}public static function provideDates(): Iterator@@ -121,7 +121,7 @@ final class NavigationStartOfPeriodTest extends TestCase;$period = $this->navigation->startOfPeriod($from, $frequency);- self::assertSame($expected->toDateString(), $period->toDateString());+ $this->assertSame($expected->toDateString(), $period->toDateString());}public static function provideUnknownFrequencies(): Iteratordiff --git a/tests/unit/Support/Search/QueryParser/AbstractQueryParserInterfaceParseQueryTester.php b/tests/unit/Support/Search/QueryParser/AbstractQueryParserInterfaceParseQueryTester.phpindex 311e745586..33946565c4 100644--- a/tests/unit/Support/Search/QueryParser/AbstractQueryParserInterfaceParseQueryTester.php+++ b/tests/unit/Support/Search/QueryParser/AbstractQueryParserInterfaceParseQueryTester.php@@ -26,7 +26,7 @@ abstract class AbstractQueryParserInterfaceParseQueryTester extends TestCase{$actual = $this->createParser()->parse($query);- self::assertObjectEquals($expected, $actual);+ $this->assertObjectEquals($expected, $actual);}