Skip to content

Commit 1e69a4e

Browse files
authored
Fix CS (#387)
1 parent d96e7af commit 1e69a4e

31 files changed

+70
-66
lines changed

.styleci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ disabled:
99
- phpdoc_inline_tag
1010
- property_separation
1111
- const_separation
12+
- single_line_throw
1213

1314
finder:
1415
exclude:

bin/root-version.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ function get_last_tag_name(): string
2121
: "-H \"Authorization: token $gitHubToken\""
2222
;
2323

24-
$lastReleaseEndpointContents = shell_exec(<<<BASH
24+
$lastReleaseEndpointContents = shell_exec(
25+
<<<BASH
2526
curl -s $headerOption https://api.github.com/repos/humbug/php-scoper/releases/latest
2627
BASH
2728
);

src/Autoload/ScoperAutoloadGenerator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ public function dump(): string
4747
$this->eol,
4848
$this->createClassAliasStatements(
4949
$this->whitelist->getRecordedWhitelistedClasses(),
50-
$hasNamespacedFunctions)
50+
$hasNamespacedFunctions
5151
)
52+
)
5253
.$this->eol
5354
.$this->eol
5455
;

src/Configuration.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@
1414

1515
namespace Humbug\PhpScoper;
1616

17-
use Humbug\PhpScoper\Patcher\SymfonyPatcher;
18-
use InvalidArgumentException;
19-
use Iterator;
20-
use RuntimeException;
21-
use SplFileInfo;
22-
use Symfony\Component\Filesystem\Filesystem;
23-
use Symfony\Component\Finder\Finder;
24-
use const DIRECTORY_SEPARATOR;
2517
use function array_key_exists;
2618
use function array_unshift;
19+
use const DIRECTORY_SEPARATOR;
2720
use function dirname;
2821
use function file_exists;
2922
use function gettype;
23+
use Humbug\PhpScoper\Patcher\SymfonyPatcher;
24+
use InvalidArgumentException;
3025
use function is_array;
3126
use function is_bool;
3227
use function is_file;
3328
use function is_link;
3429
use function is_string;
30+
use Iterator;
3531
use function readlink;
3632
use function realpath;
33+
use RuntimeException;
34+
use SplFileInfo;
3735
use function sprintf;
36+
use Symfony\Component\Filesystem\Filesystem;
37+
use Symfony\Component\Finder\Finder;
3838

3939
final class Configuration
4040
{

src/Console/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
namespace Humbug\PhpScoper\Console;
1616

1717
use Humbug\PhpScoper\Container;
18-
use Symfony\Component\Console\Application as SymfonyApplication;
1918
use function Humbug\PhpScoper\get_php_scoper_version;
19+
use Symfony\Component\Console\Application as SymfonyApplication;
2020
use function trim;
2121

2222
final class Application extends SymfonyApplication

src/Console/Command/AddPrefixCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414

1515
namespace Humbug\PhpScoper\Console\Command;
1616

17+
use function count;
1718
use Humbug\PhpScoper\Autoload\ScoperAutoloadGenerator;
1819
use Humbug\PhpScoper\Configuration;
1920
use Humbug\PhpScoper\Console\ScoperLogger;
21+
use function Humbug\PhpScoper\get_common_path;
2022
use Humbug\PhpScoper\Scoper;
2123
use Humbug\PhpScoper\Scoper\ConfigurableScoper;
2224
use Humbug\PhpScoper\Throwable\Exception\ParsingException;
@@ -31,8 +33,6 @@
3133
use Symfony\Component\Console\Style\SymfonyStyle;
3234
use Symfony\Component\Filesystem\Filesystem;
3335
use Throwable;
34-
use function count;
35-
use function Humbug\PhpScoper\get_common_path;
3636

3737
final class AddPrefixCommand extends BaseCommand
3838
{
@@ -113,7 +113,7 @@ protected function configure(): void
113113
self::NO_CONFIG_OPT,
114114
null,
115115
InputOption::VALUE_NONE,
116-
'Do not look for a configuration file.'
116+
'Do not look for a configuration file.'
117117
)
118118
;
119119
}

src/PhpParser/NodeVisitor/ConstStmtReplacer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
namespace Humbug\PhpScoper\PhpParser\NodeVisitor;
1616

17+
use function count;
1718
use Humbug\PhpScoper\PhpParser\NodeVisitor\Resolver\FullyQualifiedNameResolver;
1819
use Humbug\PhpScoper\Whitelist;
1920
use PhpParser\Node;
@@ -26,7 +27,6 @@
2627
use PhpParser\Node\Stmt\Expression;
2728
use PhpParser\NodeVisitorAbstract;
2829
use UnexpectedValueException;
29-
use function count;
3030

3131
/**
3232
* Replaces const declaration by define when the constant is whitelisted.

src/PhpParser/NodeVisitor/NameStmtPrefixer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ private function prefixName(Name $name): Node
104104
}
105105

106106
if (false === (
107-
$parentNode instanceof ArrowFunction
107+
$parentNode instanceof ArrowFunction
108108
|| $parentNode instanceof Catch_
109109
|| $parentNode instanceof ConstFetch
110110
|| $parentNode instanceof Class_
@@ -119,7 +119,7 @@ private function prefixName(Name $name): Node
119119
|| $parentNode instanceof Property
120120
|| $parentNode instanceof StaticCall
121121
|| $parentNode instanceof StaticPropertyFetch
122-
)
122+
)
123123
) {
124124
return $name;
125125
}

src/PhpParser/NodeVisitor/NamespaceStmt/NamespaceStmtCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
namespace Humbug\PhpScoper\PhpParser\NodeVisitor\NamespaceStmt;
1616

1717
use ArrayIterator;
18+
use function count;
1819
use Countable;
1920
use Humbug\PhpScoper\PhpParser\NodeVisitor\ParentNodeAppender;
2021
use IteratorAggregate;
2122
use PhpParser\Node;
2223
use PhpParser\Node\Name;
2324
use PhpParser\Node\Stmt\Namespace_;
24-
use function count;
2525

2626
/**
2727
* Utility class collecting all the namespaces for the scoped files allowing to easily find the namespace to which

src/PhpParser/NodeVisitor/NewdocPrefixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
namespace Humbug\PhpScoper\PhpParser\NodeVisitor;
1616

1717
use Humbug\PhpScoper\PhpParser\StringScoperPrefixer;
18+
use function ltrim;
1819
use PhpParser\Node;
1920
use PhpParser\Node\Scalar\String_;
2021
use PhpParser\NodeVisitorAbstract;
21-
use function ltrim;
2222
use function strpos;
2323
use function substr;
2424

0 commit comments

Comments
 (0)