Skip to content

Commit 2b74575

Browse files
committed
fix style
1 parent 464ce36 commit 2b74575

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

src/Formatter/JsonFormatter.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace IonBazan\ComposerDiff\Formatter;
44

55
use Composer\DependencyResolver\Operation\InstallOperation;
6-
use Composer\DependencyResolver\Operation\OperationInterface;
76
use Composer\DependencyResolver\Operation\UninstallOperation;
87
use Composer\DependencyResolver\Operation\UpdateOperation;
98
use IonBazan\ComposerDiff\Diff\DiffEntries;

src/Formatter/MarkdownListFormatter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ private function getRow(DiffEntry $entry, $withUrls)
5353
if ($operation instanceof InstallOperation) {
5454
$packageName = $operation->getPackage()->getName();
5555
$packageUrl = $withUrls ? $this->formatUrl($this->getProjectUrl($operation), $packageName) : $packageName;
56+
5657
return sprintf(
5758
' - Install <fg=green>%s</> (<fg=yellow>%s</>)%s',
5859
$packageUrl ?: $packageName,
@@ -64,6 +65,7 @@ private function getRow(DiffEntry $entry, $withUrls)
6465
if ($operation instanceof UpdateOperation) {
6566
$packageName = $operation->getInitialPackage()->getName();
6667
$projectUrl = $withUrls ? $this->formatUrl($this->getProjectUrl($operation), $packageName) : $packageName;
68+
6769
return sprintf(
6870
' - %s <fg=green>%s</> (<fg=yellow>%s</> => <fg=yellow>%s</>)%s',
6971
ucfirst($entry->getType()),
@@ -77,6 +79,7 @@ private function getRow(DiffEntry $entry, $withUrls)
7779
if ($operation instanceof UninstallOperation) {
7880
$packageName = $operation->getPackage()->getName();
7981
$packageUrl = $withUrls ? $this->formatUrl($this->getProjectUrl($operation), $packageName) : $packageName;
82+
8083
return sprintf(
8184
' - Uninstall <fg=green>%s</> (<fg=yellow>%s</>)%s',
8285
$packageUrl ?: $packageName,

src/Formatter/MarkdownTableFormatter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public function renderSingle(DiffEntries $entries, $title, $withUrls)
5454

5555
/**
5656
* @param bool $withUrls
57+
*
5758
* @return string[]
5859
*/
5960
private function getTableRow(DiffEntry $entry, $withUrls)
@@ -62,6 +63,7 @@ private function getTableRow(DiffEntry $entry, $withUrls)
6263
if ($operation instanceof InstallOperation) {
6364
$packageName = $operation->getPackage()->getName();
6465
$packageUrl = $withUrls ? $this->formatUrl($this->getProjectUrl($operation), $packageName) : $packageName;
66+
6567
return array(
6668
$packageUrl ?: $packageName,
6769
'<fg=green>New</>',
@@ -73,6 +75,7 @@ private function getTableRow(DiffEntry $entry, $withUrls)
7375
if ($operation instanceof UpdateOperation) {
7476
$packageName = $operation->getInitialPackage()->getName();
7577
$projectUrl = $withUrls ? $this->formatUrl($this->getProjectUrl($operation), $packageName) : $packageName;
78+
7679
return array(
7780
$projectUrl ?: $packageName,
7881
$entry->isChange() ? '<fg=magenta>Changed</>' : ($entry->isUpgrade() ? '<fg=cyan>Upgraded</>' : '<fg=yellow>Downgraded</>'),
@@ -84,6 +87,7 @@ private function getTableRow(DiffEntry $entry, $withUrls)
8487
if ($operation instanceof UninstallOperation) {
8588
$packageName = $operation->getPackage()->getName();
8689
$packageUrl = $withUrls ? $this->formatUrl($this->getProjectUrl($operation), $packageName) : $packageName;
90+
8791
return array(
8892
$packageUrl ?: $packageName,
8993
'<fg=red>Removed</>',

tests/Formatter/FormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected function getDisplay(OutputInterface $output)
108108
}
109109

110110
/**
111-
* @return MockObject&GeneratorContainer
111+
* @return MockObject|GeneratorContainer
112112
*/
113113
protected function getGenerators()
114114
{

tests/Formatter/GitHubFormatterTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22

33
namespace IonBazan\ComposerDiff\Tests\Formatter;
44

5-
use Composer\DependencyResolver\Operation\InstallOperation;
6-
use Composer\DependencyResolver\Operation\UninstallOperation;
7-
use Composer\DependencyResolver\Operation\UpdateOperation;
85
use IonBazan\ComposerDiff\Formatter\GitHubFormatter;
9-
use IonBazan\ComposerDiff\Formatter\JsonFormatter;
106
use IonBazan\ComposerDiff\Url\GeneratorContainer;
117
use Symfony\Component\Console\Output\OutputInterface;
12-
use Symfony\Component\Console\Output\StreamOutput;
138

149
class GitHubFormatterTest extends FormatterTest
1510
{

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function setExpectedException($exception, $message = '', $code = null)
3131
* @param string $version
3232
* @param string|null $fullVersion
3333
*
34-
* @return MockObject&PackageInterface
34+
* @return MockObject|PackageInterface
3535
*/
3636
protected function getPackage($name, $version, $fullVersion = null)
3737
{

0 commit comments

Comments
 (0)