Skip to content

Commit 6c172ad

Browse files
committed
Fix CS
1 parent 0a1b533 commit 6c172ad

File tree

5 files changed

+22
-30
lines changed

5 files changed

+22
-30
lines changed

src/Autoload/ScoperAutoloadGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function %1$s() {
193193
private function hasNamespacedFunctions(array $functions): bool
194194
{
195195
foreach ($functions as [$original, $alias]) {
196-
/**
196+
/*
197197
* @var string
198198
* @var string $alias
199199
*/

src/PhpParser/Node/NamedIdentifier.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the humbug/php-scoper package.
7+
*
8+
* Copyright (c) 2017 Théo FIDRY <[email protected]>,
9+
* Pádraic Brady <[email protected]>
10+
*
11+
* For the full copyright and license information, please view the LICENSE
12+
* file that was distributed with this source code.
13+
*/
14+
515
namespace Humbug\PhpScoper\PhpParser\Node;
16+
617
use PhpParser\Node\Identifier;
718
use PhpParser\Node\Name;
819

@@ -25,4 +36,4 @@ public function getOriginalNode(): Identifier
2536
{
2637
return $this->originalNode;
2738
}
28-
}
39+
}

src/PhpParser/NodeVisitor/Collection/UseStmtCollection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
namespace Humbug\PhpScoper\PhpParser\NodeVisitor\Collection;
1616

1717
use ArrayIterator;
18-
use function count;
1918
use Humbug\PhpScoper\PhpParser\Node\NamedIdentifier;
2019
use Humbug\PhpScoper\PhpParser\NodeVisitor\ParentNodeAppender;
2120
use IteratorAggregate;
@@ -27,6 +26,7 @@
2726
use PhpParser\Node\Stmt\Function_;
2827
use PhpParser\Node\Stmt\Use_;
2928
use PhpParser\Node\Stmt\UseUse;
29+
use function count;
3030
use function Humbug\PhpScoper\clone_node;
3131

3232
/**
@@ -140,7 +140,7 @@ private function isFunctionName(Name $node, ?Node $parentNode): bool
140140
if (false === ($parentNode instanceof Function_)) {
141141
return false;
142142
}
143-
/** @var Function_ $parentNode */
143+
/* @var Function_ $parentNode */
144144

145145
return $node instanceof NamedIdentifier && $node->getOriginalNode() === $parentNode->name;
146146
}

tests/Scoper/PhpScoperSpecTest.php

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,12 @@
1414

1515
namespace Humbug\PhpScoper\Scoper;
1616

17-
use function array_diff;
18-
use function array_keys;
19-
use function array_map;
20-
use function current;
2117
use Generator;
22-
use Humbug\PhpScoper\PhpParser\FakeParser;
2318
use Humbug\PhpScoper\PhpParser\TraverserFactory;
2419
use Humbug\PhpScoper\Reflector;
2520
use Humbug\PhpScoper\Scoper;
2621
use Humbug\PhpScoper\Whitelist;
27-
use function is_array;
28-
use LogicException;
29-
use const PHP_EOL;
30-
use PhpParser\Error as PhpParserError;
31-
use PhpParser\Node\Name;
32-
use PhpParser\NodeTraverserInterface;
33-
use PhpParser\Parser;
3422
use PHPUnit\Framework\TestCase;
35-
use Prophecy\Argument;
36-
use Prophecy\Prophecy\ObjectProphecy;
3723
use Roave\BetterReflection\BetterReflection;
3824
use Roave\BetterReflection\Reflector\ClassReflector;
3925
use Roave\BetterReflection\Reflector\FunctionReflector;
@@ -43,9 +29,15 @@
4329
use Symfony\Component\Finder\Finder;
4430
use Throwable;
4531
use UnexpectedValueException;
32+
use const PHP_EOL;
33+
use function array_diff;
34+
use function array_keys;
35+
use function array_map;
36+
use function current;
4637
use function Humbug\PhpScoper\create_fake_patcher;
4738
use function Humbug\PhpScoper\create_parser;
4839
use function implode;
40+
use function is_array;
4941
use function sprintf;
5042

5143
class PhpScoperSpecTest extends TestCase
@@ -272,8 +264,7 @@ private function createSpecMessage(
272264
?string $actual,
273265
array $expectedRegisteredClasses,
274266
array $expectedRegisteredFunctions
275-
): string
276-
{
267+
): string {
277268
$formattedWhitelist = $this->formatSimpleList($whitelist->toArray());
278269

279270
$formattedWhitelistGlobalConstants = $this->convertBoolToString($whitelist->whitelistGlobalConstants());

tests/Scoper/PhpScoperTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
namespace Humbug\PhpScoper\Scoper;
1616

17-
use Generator;
1817
use Humbug\PhpScoper\PhpParser\FakeParser;
1918
use Humbug\PhpScoper\PhpParser\TraverserFactory;
2019
use Humbug\PhpScoper\Reflector;
@@ -28,19 +27,10 @@
2827
use PHPUnit\Framework\TestCase;
2928
use Prophecy\Argument;
3029
use Prophecy\Prophecy\ObjectProphecy;
31-
use Roave\BetterReflection\BetterReflection;
3230
use Roave\BetterReflection\Reflector\ClassReflector;
3331
use Roave\BetterReflection\Reflector\FunctionReflector;
34-
use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator;
35-
use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator;
36-
use Roave\BetterReflection\SourceLocator\Type\StringSourceLocator;
37-
use Symfony\Component\Finder\Finder;
38-
use Throwable;
39-
use UnexpectedValueException;
4032
use function Humbug\PhpScoper\create_fake_patcher;
4133
use function Humbug\PhpScoper\create_parser;
42-
use function implode;
43-
use function sprintf;
4434

4535
class PhpScoperTest extends TestCase
4636
{

0 commit comments

Comments
 (0)