Skip to content

Commit

Permalink
Merge pull request #112 from ergebnis/fix/method
Browse files Browse the repository at this point in the history
Fix: Use methods instead of deprecated magic properties
  • Loading branch information
localheinz authored Nov 28, 2021
2 parents 679974a + e8226e3 commit e182689
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
21 changes: 5 additions & 16 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@
</PropertyNotSetInConstructor>
</file>
<file src="test/Unit/Console/ColorTest.php">
<DeprecatedMethod occurrences="1">
<code>sentence</code>
</DeprecatedMethod>
<MixedArgument occurrences="1">
<code>$output</code>
</MixedArgument>
Expand Down Expand Up @@ -102,12 +99,9 @@
</PropertyNotSetInConstructor>
</file>
<file src="test/Unit/SlowTestTest.php">
<DeprecatedMethod occurrences="1">
<code>word</code>
</DeprecatedMethod>
<MixedArgument occurrences="2">
<code>$faker-&gt;word</code>
<code>$faker-&gt;word</code>
<code>$faker-&gt;word()</code>
<code>$faker-&gt;word()</code>
</MixedArgument>
<PropertyNotSetInConstructor occurrences="2">
<code>SlowTestTest</code>
Expand All @@ -127,15 +121,10 @@
</PropertyNotSetInConstructor>
</file>
<file src="test/Unit/Subscriber/TestSuiteFinishedSubscriberTest.php">
<DeprecatedMethod occurrences="3">
<code>word</code>
<code>word</code>
<code>word</code>
</DeprecatedMethod>
<MixedArgument occurrences="3">
<code>$faker-&gt;word</code>
<code>$faker-&gt;word</code>
<code>$faker-&gt;word</code>
<code>$faker-&gt;word()</code>
<code>$faker-&gt;word()</code>
<code>$faker-&gt;word()</code>
</MixedArgument>
<PropertyNotSetInConstructor occurrences="2">
<code>TestSuiteFinishedSubscriberTest</code>
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Console/ColorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testDimReturnsOriginalStringWhenItIsWhitespaceOnly(string $outpu

public function testDimReturnsDimmedStringWhenItIsNotWhitespaceOnly(): void
{
$output = self::faker()->sentence;
$output = self::faker()->sentence();

$expected = <<<TXT
\e[2m{$output}\e[22m
Expand Down
4 changes: 2 additions & 2 deletions test/Unit/SlowTestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public function testFromTestDurationAndMaximumDurationReturnsSlowTest(): void

$test = new Event\Code\Test(
self::class,
$faker->word,
$faker->word,
$faker->word(),
$faker->word(),
);

$duration = Event\Telemetry\Duration::fromSecondsAndNanoseconds(
Expand Down
6 changes: 3 additions & 3 deletions test/Unit/Subscriber/TestSuiteFinishedSubscriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function testNotifyDoesNothingWhenCollectorHasNotCollectedAnything(): voi
),
Event\Telemetry\MemoryUsage::fromBytes($faker->numberBetween()),
),
$faker->word,
$faker->word(),
new Event\TestSuite\Result(
$faker->numberBetween(),
new Event\TestSuite\FailureCollection(),
Expand Down Expand Up @@ -157,7 +157,7 @@ public function testNotifyDoesNothingWhenReporterHasNotReportedAnything(): void
),
Event\Telemetry\MemoryUsage::fromBytes($faker->numberBetween()),
),
$faker->word,
$faker->word(),
new Event\TestSuite\Result(
$faker->numberBetween(),
new Event\TestSuite\FailureCollection(),
Expand Down Expand Up @@ -265,7 +265,7 @@ public function testNotifyEchosReportWhenReporterHasReportedSomething(): void
),
Event\Telemetry\MemoryUsage::fromBytes($faker->numberBetween()),
),
$faker->word,
$faker->word(),
new Event\TestSuite\Result(
$faker->numberBetween(),
new Event\TestSuite\FailureCollection(),
Expand Down

0 comments on commit e182689

Please sign in to comment.