Skip to content

Commit

Permalink
Fix CS (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Sep 25, 2022
1 parent a71dbdd commit 2a09afe
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 10 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
'try',
],
],
'blank_line_between_import_groups' => false,
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'compact_nullable_typehint' => true,
Expand Down
9 changes: 5 additions & 4 deletions src/Compactor/Php.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* @author Théo Fidry <[email protected]>
* @author Juliette Reinders Folmer <[email protected]>
* @author Alessandro Chitolina <[email protected]>
*
* @private
*/
final class Php extends FileExtensionCompactor
Expand Down Expand Up @@ -218,7 +219,7 @@ private function retokenizeAttribute(array &$tokens, int $opener): ?array
// Multi-line attribute or attribute containing something which looks like a PHP close tag.
// Retokenize the rest of the file after the attribute opener.
if (null === $closer) {
foreach (array_slice($tokens, ($opener + 1)) as $token) {
foreach (array_slice($tokens, $opener + 1) as $token) {
$attributeBody .= $token->text;
}

Expand All @@ -230,12 +231,12 @@ private function retokenizeAttribute(array &$tokens, int $opener): ?array
if (null !== $closer) {
array_splice(
$tokens,
($opener + 1),
$opener + 1,
count($tokens),
array_slice($subTokens, ($closer + 1)),
array_slice($subTokens, $closer + 1),
);

$subTokens = array_slice($subTokens, 0, ($closer + 1));
$subTokens = array_slice($subTokens, 0, $closer + 1);
}
}

Expand Down
1 change: 1 addition & 0 deletions src/FileSystem/FileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
* @author Fabien Potencier <[email protected]>
* @author Bernhard Schussek <[email protected]>
* @author Thomas Schulz <[email protected]>
*
* @private
*/
final class FileSystem extends SymfonyFilesystem
Expand Down
2 changes: 1 addition & 1 deletion src/Json/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function decode(string $json, bool $assoc = false): array|stdClass
}

return false === $assoc ? (object) $data : $data; // If JSON is an empty JSON json_decode returns an empty
// array instead of an stdClass instance
// array instead of an stdClass instance
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/MapFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

/**
* @internal
*
* @private
*/
final class MapFile
Expand Down
4 changes: 2 additions & 2 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ function memory_to_bytes(string $value): float|int
switch ($unit) {
case 'g':
$bytes *= 1024;
// no break (cumulative multiplier)
// no break (cumulative multiplier)
case 'm':
$bytes *= 1024;
// no break (cumulative multiplier)
// no break (cumulative multiplier)
case 'k':
$bytes *= 1024;
}
Expand Down
1 change: 1 addition & 0 deletions tests/BoxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,7 @@ public function test_it_cannot_compress_the_phar_while_buffering(): void

/**
* @dataProvider compressionAlgorithmsProvider
*
* @requires extension zlib
* @requires extension bz2
*/
Expand Down
6 changes: 3 additions & 3 deletions tests/Composer/ComposerOrchestratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ public static function composerAutoloadProvider(): iterable
require_once __DIR__ . '/composer/autoload_real.php';
\$loader = ${composerAutoloaderName}::getLoader();
\$loader = {$composerAutoloaderName}::getLoader();
// Exposed functions. For more information see:
// https://github.com/humbug/php-scoper/blob/master/docs/configuration.md#exposing-functions
Expand Down Expand Up @@ -571,7 +571,7 @@ function foo() {
require_once __DIR__ . '/composer/autoload_real.php';
\$loader = ${composerAutoloaderName}::getLoader();
\$loader = {$composerAutoloaderName}::getLoader();
}
Expand Down Expand Up @@ -627,7 +627,7 @@ function foo() {
require_once __DIR__ . '/composer/autoload_real.php';
\$loader = ${composerAutoloaderName}::getLoader();
\$loader = {$composerAutoloaderName}::getLoader();
}
Expand Down
1 change: 1 addition & 0 deletions tests/Configuration/ConfigurationFileNoConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

/**
* @covers \KevinGH\Box\Configuration\Configuration
*
* @group config
*/
class ConfigurationFileNoConfigTest extends ConfigurationTestCase
Expand Down
1 change: 1 addition & 0 deletions tests/Configuration/ConfigurationFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

/**
* @covers \KevinGH\Box\Configuration\Configuration
*
* @group config
*/
class ConfigurationFileTest extends ConfigurationTestCase
Expand Down
1 change: 1 addition & 0 deletions tests/Configuration/ConfigurationPhpCompactorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

/**
* @covers \KevinGH\Box\Configuration\Configuration
*
* @group config
*/
class ConfigurationPhpCompactorTest extends ConfigurationTestCase
Expand Down
1 change: 1 addition & 0 deletions tests/Configuration/ConfigurationSigningTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/**
* @covers \KevinGH\Box\Configuration\Configuration
* @covers \KevinGH\Box\MapFile
*
* @group config
*/
class ConfigurationSigningTest extends ConfigurationTestCase
Expand Down
1 change: 1 addition & 0 deletions tests/Configuration/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
/**
* @covers \KevinGH\Box\Configuration\Configuration
* @covers \KevinGH\Box\MapFile
*
* @group config
*/
class ConfigurationTest extends ConfigurationTestCase
Expand Down
1 change: 1 addition & 0 deletions tests/Console/Command/ValidateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
/**
* @covers \KevinGH\Box\Console\Command\Validate
* @covers \KevinGH\Box\Console\MessageRenderer
*
* @runTestsInSeparateProcesses
*/
class ValidateTest extends CommandTestCase
Expand Down
1 change: 1 addition & 0 deletions tests/Json/JsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

/**
* @covers \KevinGH\Box\Json\Json
*
* @requires extension mbstring
*/
class JsonTest extends FileSystemTestCase
Expand Down
1 change: 1 addition & 0 deletions tests/PhpUnitAnnotationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

/**
* @runInSeparateProcess
*
* @coversNothing
*/
class PhpUnitAnnotationsTest extends TestCase
Expand Down

0 comments on commit 2a09afe

Please sign in to comment.