Skip to content

Commit 2eb54c7

Browse files
committed
cs fixer
1 parent 417609c commit 2eb54c7

File tree

11 files changed

+18
-19
lines changed

11 files changed

+18
-19
lines changed

src/Analyzer/ClassDescription.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class ClassDescription
4444
/**
4545
* @param list<ClassDependency> $dependencies
4646
* @param list<FullyQualifiedClassName> $interfaces
47-
* @param ?FullyQualifiedClassName $extends
4847
* @param list<FullyQualifiedClassName> $attributes
4948
*/
5049
public function __construct(
@@ -59,7 +58,7 @@ public function __construct(
5958
bool $trait,
6059
bool $enum,
6160
array $docBlock = [],
62-
array $attributes = []
61+
array $attributes = [],
6362
) {
6463
$this->FQCN = $FQCN;
6564
$this->dependencies = $dependencies;

src/Analyzer/FileParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(
2828
NodeTraverser $traverser,
2929
FileVisitor $fileVisitor,
3030
NameResolver $nameResolver,
31-
TargetPhpVersion $targetPhpVersion
31+
TargetPhpVersion $targetPhpVersion,
3232
) {
3333
$this->fileVisitor = $fileVisitor;
3434
$this->parsingErrors = [];

src/CLI/Command/Check.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
125125
$this->printHeadingLine($output);
126126

127127
$rulesFilename = $this->getConfigFilename($input);
128-
$output->writeln(sprintf("Config file: %s\n", $rulesFilename));
128+
$output->writeln(\sprintf("Config file: %s\n", $rulesFilename));
129129

130130
$config = new Config();
131131

@@ -239,14 +239,14 @@ private function getConfigFilename(InputInterface $input): string
239239
private function printViolations(Violations $violations, OutputInterface $output): void
240240
{
241241
$output->writeln('<error>ERRORS!</error>');
242-
$output->writeln(sprintf('%s', $violations->toString()));
243-
$output->writeln(sprintf('<error>%s VIOLATIONS DETECTED!</error>', \count($violations)));
242+
$output->writeln(\sprintf('%s', $violations->toString()));
243+
$output->writeln(\sprintf('<error>%s VIOLATIONS DETECTED!</error>', \count($violations)));
244244
}
245245

246246
private function printParsedErrors(ParsingErrors $parsingErrors, OutputInterface $output): void
247247
{
248248
$output->writeln('<error>ERROR ON PARSING THESE FILES:</error>');
249-
$output->writeln(sprintf('%s', $parsingErrors->toString()));
249+
$output->writeln(\sprintf('%s', $parsingErrors->toString()));
250250
}
251251

252252
private function printNoViolationsDetectedMessage(OutputInterface $output): void

src/CLI/PhpArkitectApplication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ public function __construct()
2828

2929
public function getLongVersion(): string
3030
{
31-
return sprintf("%s\n\n<info>%s</info> version <comment>%s</comment>", self::$logo, $this->getName(), $this->getVersion());
31+
return \sprintf("%s\n\n<info>%s</info> version <comment>%s</comment>", self::$logo, $this->getName(), $this->getVersion());
3232
}
3333
}

src/CLI/Runner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function check(
4848
Progress $progress,
4949
Parser $fileParser,
5050
Violations $violations,
51-
ParsingErrors $parsingErrors
51+
ParsingErrors $parsingErrors,
5252
): void {
5353
/** @var SplFileInfo $file */
5454
foreach ($classSetRule->getClassSet() as $file) {

src/Exceptions/IndexNotFoundException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ class IndexNotFoundException extends \Exception
77
{
88
public function __construct(int $index)
99
{
10-
parent::__construct(sprintf('Index not found %d', $index));
10+
parent::__construct(\sprintf('Index not found %d', $index));
1111
}
1212
}

src/Exceptions/PhpVersionNotValidException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ class PhpVersionNotValidException extends \Exception
77
{
88
public function __construct(string $phpVersion)
99
{
10-
parent::__construct(sprintf('PHP version not valid for PHPArkitect parser %s', $phpVersion));
10+
parent::__construct(\sprintf('PHP version not valid for PHPArkitect parser %s', $phpVersion));
1111
}
1212
}

src/Rules/ArchRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct(
2727
Constraints $constraints,
2828
string $because,
2929
array $classesToBeExcluded,
30-
bool $runOnlyThis
30+
bool $runOnlyThis,
3131
) {
3232
$this->thats = $specs;
3333
$this->shoulds = $constraints;

tests/E2E/Cli/CheckCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ protected function runCheck(
172172
?string $useBaseline = null,
173173
$generateBaseline = false,
174174
bool $skipBaseline = false,
175-
bool $ignoreBaselineNumbers = false
175+
bool $ignoreBaselineNumbers = false,
176176
): ApplicationTester {
177177
$input = ['check'];
178178
if (null !== $configFilePath) {

tests/Unit/Analyzer/FileVisitorTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ enum DefaultEnum
12931293
{
12941294
case FOO;
12951295
}
1296-
EOF
1296+
EOF,
12971297
];
12981298

12991299
yield 'string enum' => [
@@ -1305,7 +1305,7 @@ enum StringEnum: string
13051305
{
13061306
case BAR: 'bar';
13071307
}
1308-
EOF
1308+
EOF,
13091309
];
13101310

13111311
yield 'integer enum' => [
@@ -1317,7 +1317,7 @@ enum IntEnum: int
13171317
{
13181318
case BAZ: 42;
13191319
}
1320-
EOF
1320+
EOF,
13211321
];
13221322

13231323
yield 'multiple enums' => [
@@ -1339,7 +1339,7 @@ enum IntEnum: int
13391339
{
13401340
case BAZ: 42;
13411341
}
1342-
EOF
1342+
EOF,
13431343
];
13441344
}
13451345
}

0 commit comments

Comments
 (0)