From 06694231388bc7c1c91839c1148e51cb3b4a2a57 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 15 Sep 2022 21:11:42 +0100 Subject: [PATCH] Style --- src/Plugins/Coverage.php | 1 - src/Support/Coverage.php | 2 +- tests/Visual/SingleTestOrDirectory.php | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Plugins/Coverage.php b/src/Plugins/Coverage.php index 592db5a6..4b7c3309 100644 --- a/src/Plugins/Coverage.php +++ b/src/Plugins/Coverage.php @@ -113,7 +113,6 @@ final class Coverage implements AddsOutput, HandlesArguments } } - $this->output->writeln(['']); return $exitCode; diff --git a/src/Support/Coverage.php b/src/Support/Coverage.php index 209f2fa5..7d0ae034 100644 --- a/src/Support/Coverage.php +++ b/src/Support/Coverage.php @@ -11,6 +11,7 @@ use SebastianBergmann\CodeCoverage\Node\File; use SebastianBergmann\Environment\Runtime; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Terminal; + use function Termwind\render; use function Termwind\renderUsing; @@ -121,7 +122,6 @@ final class Coverage )); } - $totalCoverageAsString = $totalCoverage->asFloat() === 0.0 ? '0.0' : number_format($totalCoverage->asFloat(), 1, '.', ''); diff --git a/tests/Visual/SingleTestOrDirectory.php b/tests/Visual/SingleTestOrDirectory.php index d0fbb0a7..85679269 100644 --- a/tests/Visual/SingleTestOrDirectory.php +++ b/tests/Visual/SingleTestOrDirectory.php @@ -31,7 +31,7 @@ test('allows to run a directory', function () use ($run, $snapshot) { })->skip(PHP_OS_FAMILY === 'Windows'); it('has ascii chars', function () use ($run, $snapshot) { - file_put_contents(__DIR__.'/output.txt', $run('tests/Fixtures/DirectoryWithTests/ExampleTest.php', true)); + file_put_contents(__DIR__ . '/output.txt', $run('tests/Fixtures/DirectoryWithTests/ExampleTest.php', true)); expect($run('tests/Fixtures/DirectoryWithTests/ExampleTest.php', true))->toContain($snapshot('has-ascii-chars')); })->skip(PHP_OS_FAMILY === 'Windows');