Skip to content

Commit

Permalink
reset
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Nov 25, 2023
1 parent 706bcb6 commit fd86138
Show file tree
Hide file tree
Showing 45 changed files with 194 additions and 206 deletions.
2 changes: 1 addition & 1 deletion requirement-checker/src/Checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private static function createCondition($type, $condition): IsFulfilled
throw new InvalidArgumentException(
sprintf(
'Unknown requirement type "%s".',
$type
$type,
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion requirement-checker/tests/RequirementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __invoke(): bool
$requirement->isFulfilled();

self::fail('Expected exception to be thrown.');
} catch (Error) {
} catch (Error $error) {
self::assertTrue(true);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/Annotation/DocblockAnnotationParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ final class DocblockAnnotationParser
/**
* @var array<string, mixed>
*/
private readonly array $ignoredAnnotationsAsKeys;
private array $ignoredAnnotationsAsKeys;

/**
* @param string[] $ignoredAnnotations
*/
public function __construct(
private readonly DocBlockFactoryInterface $factory,
private readonly Formatter $tagsFormatter,
private DocBlockFactoryInterface $factory,
private Formatter $tagsFormatter,
array $ignoredAnnotations,
) {
$this->ignoredAnnotationsAsKeys = array_flip($ignoredAnnotations);
Expand Down
6 changes: 3 additions & 3 deletions src/Box.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,12 +463,12 @@ private function processContents(array $files): array

// Keep the fully qualified call here since this function may be executed without the right autoloading
// mechanism
register_aliases();
\KevinGH\Box\register_aliases();
if ($enableParallelization) {
register_error_handler();
\KevinGH\Box\register_error_handler();
}

$contents = FS::getFileContents($file);
$contents = \Fidry\FileSystem\FS::getFileContents($file);

$local = $mapFile($file);

Expand Down
2 changes: 1 addition & 1 deletion src/Compactor/Compactors.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ final class Compactors implements Compactor, Countable
/**
* @var Compactor[]
*/
private readonly array $compactors;
private array $compactors;

private ?PhpScoper $scoperCompactor = null;

Expand Down
2 changes: 1 addition & 1 deletion src/Compactor/FileExtensionCompactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ abstract class FileExtensionCompactor extends BaseCompactor
/**
* @var string[]
*/
private readonly array $extensions;
private array $extensions;

/**
* @param string[] $extensions the list of supported file extensions
Expand Down
2 changes: 1 addition & 1 deletion src/Compactor/Php.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static function create(array $ignoredAnnotations): self
}

public function __construct(
private readonly ?DocblockAnnotationParser $annotationParser,
private ?DocblockAnnotationParser $annotationParser,
array $extensions = ['php'],
) {
parent::__construct($extensions);
Expand Down
2 changes: 1 addition & 1 deletion src/Compactor/PhpScoper.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* @private
*/
final readonly class PhpScoper implements Compactor
final class PhpScoper implements Compactor
{
public function __construct(private Scoper $scoper)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Compactor/Placeholder.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final class Placeholder implements Compactor
/**
* @var scalar[]
*/
private readonly array $placeholders;
private array $placeholders;

/**
* @param scalar[] $placeholders
Expand Down
2 changes: 1 addition & 1 deletion src/Composer/CompilerPsrLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
final class CompilerPsrLogger extends AbstractLogger
{
public function __construct(
private readonly CompilerLogger $decoratedLogger,
private CompilerLogger $decoratedLogger,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Composer/ComposerFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

final class ComposerFile
{
private readonly ?string $path;
private readonly array $contents;
private ?string $path;
private array $contents;

public static function createEmpty(): self
{
Expand Down
8 changes: 4 additions & 4 deletions src/Composer/ComposerFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use function array_map;
use function array_values;

final readonly class ComposerFiles
final class ComposerFiles
{
public static function createEmpty(): self
{
Expand All @@ -30,9 +30,9 @@ public static function createEmpty(): self
}

public function __construct(
private ComposerFile $composerJson,
private ComposerFile $composerLock,
private ComposerFile $installedJson,
private readonly ComposerFile $composerJson,
private readonly ComposerFile $composerLock,
private readonly ComposerFile $installedJson,
) {
}

Expand Down
6 changes: 3 additions & 3 deletions src/Composer/ComposerOrchestrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public static function create(): self
}

public function __construct(
private readonly ComposerProcessFactory $processFactory,
private readonly LoggerInterface $logger,
private readonly FileSystem $fileSystem,
private ComposerProcessFactory $processFactory,
private LoggerInterface $logger,
private FileSystem $fileSystem,
) {
}

Expand Down
6 changes: 3 additions & 3 deletions src/Composer/ComposerProcessFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ public static function create(
* @param Closure():string $composerExecutableFactory
*/
public function __construct(
private readonly Closure $composerExecutableFactory,
private Closure $composerExecutableFactory,
private ?string $verbosity,
private readonly bool $ansi,
private readonly array $defaultEnvironmentVariables,
private bool $ansi,
private array $defaultEnvironmentVariables,
) {
}

Expand Down
70 changes: 35 additions & 35 deletions src/Configuration/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ final class Configuration
private const STUB_KEY = 'stub';
private const TIMESTAMP = 'timestamp';

private readonly ?string $mainScriptPath;
private readonly ?string $mainScriptContents;
private ?string $mainScriptPath;
private ?string $mainScriptContents;
private ?string $composerBin = null;

public static function create(?string $file, stdClass $raw): self
Expand Down Expand Up @@ -418,41 +418,41 @@ public static function create(?string $file, stdClass $raw): self
* @param string[] $recommendations
*/
private function __construct(
private readonly ?string $file,
private readonly string $alias,
private readonly string $basePath,
private readonly ComposerFile $composerJson,
private readonly ComposerFile $composerLock,
private readonly array $files,
private readonly array $binaryFiles,
private readonly bool $autodiscoveredFiles,
private readonly bool $dumpAutoload,
private readonly bool $excludeComposerFiles,
private readonly bool $excludeDevFiles,
private readonly Compactors|array $compactors,
private readonly CompressionAlgorithm $compressionAlgorithm,
private readonly int|string|null $fileMode,
private ?string $file,
private string $alias,
private string $basePath,
private ComposerFile $composerJson,
private ComposerFile $composerLock,
private array $files,
private array $binaryFiles,
private bool $autodiscoveredFiles,
private bool $dumpAutoload,
private bool $excludeComposerFiles,
private bool $excludeDevFiles,
private Compactors|array $compactors,
private CompressionAlgorithm $compressionAlgorithm,
private int|string|null $fileMode,
?string $mainScriptPath,
?string $mainScriptContents,
private readonly MapFile $fileMapper,
private readonly mixed $metadata,
private readonly string $tmpOutputPath,
private readonly string $outputPath,
private readonly ?string $privateKeyPassphrase,
private readonly ?string $privateKeyPath,
private readonly bool $promptForPrivateKey,
private readonly array $processedReplacements,
private readonly ?string $shebang,
private readonly SigningAlgorithm $signingAlgorithm,
private readonly ?string $stubBannerContents,
private readonly ?string $stubBannerPath,
private readonly ?string $stubPath,
private readonly bool $isInterceptFileFuncs,
private readonly bool $isStubGenerated,
private readonly ?DateTimeImmutable $timestamp,
private readonly bool $checkRequirements,
private readonly array $warnings,
private readonly array $recommendations,
private MapFile $fileMapper,
private mixed $metadata,
private string $tmpOutputPath,
private string $outputPath,
private ?string $privateKeyPassphrase,
private ?string $privateKeyPath,
private bool $promptForPrivateKey,
private array $processedReplacements,
private ?string $shebang,
private SigningAlgorithm $signingAlgorithm,
private ?string $stubBannerContents,
private ?string $stubBannerPath,
private ?string $stubPath,
private bool $isInterceptFileFuncs,
private bool $isStubGenerated,
private ?DateTimeImmutable $timestamp,
private bool $checkRequirements,
private array $warnings,
private array $recommendations,
) {
if (null === $mainScriptPath) {
Assert::null($mainScriptContents);
Expand Down
4 changes: 2 additions & 2 deletions src/Configuration/ConfigurationLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
/**
* @private
*/
final readonly class ConfigurationLoader
final class ConfigurationLoader
{
private const SCHEMA_FILE = __DIR__.'/../../res/schema.json';

public function __construct(private Json $json = new Json())
public function __construct(private readonly Json $json = new Json())
{
}

Expand Down
70 changes: 35 additions & 35 deletions src/Configuration/ExportableConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*
* @internal
*/
final readonly class ExportableConfiguration
final class ExportableConfiguration
{
public static function create(Configuration $configuration): self
{
Expand Down Expand Up @@ -114,40 +114,40 @@ private static function createPathNormalizer(string $basePath): Closure

/** @noinspection PhpPropertyOnlyWrittenInspection */
private function __construct(
private ?string $file,
private string $alias,
private string $basePath,
private ComposerFile $composerJson,
private ComposerFile $composerLock,
private array $files,
private array $binaryFiles,
private bool $autodiscoveredFiles,
private bool $dumpAutoload,
private bool $excludeComposerFiles,
private bool $excludeDevFiles,
private Compactors|array $compactors,
private string $compressionAlgorithm,
private int|string|null $fileMode,
private ?string $mainScriptPath,
private ?string $mainScriptContents,
private MapFile $fileMapper,
private mixed $metadata,
private string $tmpOutputPath,
private string $outputPath,
private ?string $privateKeyPassphrase,
private ?string $privateKeyPath,
private bool $promptForPrivateKey,
private array $processedReplacements,
private ?string $shebang,
private string $signingAlgorithm,
private ?string $stubBannerContents,
private ?string $stubBannerPath,
private ?string $stubPath,
private bool $isInterceptFileFuncs,
private bool $isStubGenerated,
private bool $checkRequirements,
private array $warnings,
private array $recommendations,
private readonly ?string $file,
private readonly string $alias,
private readonly string $basePath,
private readonly ComposerFile $composerJson,
private readonly ComposerFile $composerLock,
private readonly array $files,
private readonly array $binaryFiles,
private readonly bool $autodiscoveredFiles,
private readonly bool $dumpAutoload,
private readonly bool $excludeComposerFiles,
private readonly bool $excludeDevFiles,
private readonly Compactors|array $compactors,
private readonly string $compressionAlgorithm,
private readonly int|string|null $fileMode,
private readonly ?string $mainScriptPath,
private readonly ?string $mainScriptContents,
private readonly MapFile $fileMapper,
private readonly mixed $metadata,
private readonly string $tmpOutputPath,
private readonly string $outputPath,
private readonly ?string $privateKeyPassphrase,
private readonly ?string $privateKeyPath,
private readonly bool $promptForPrivateKey,
private readonly array $processedReplacements,
private readonly ?string $shebang,
private readonly string $signingAlgorithm,
private readonly ?string $stubBannerContents,
private readonly ?string $stubBannerPath,
private readonly ?string $stubPath,
private readonly bool $isInterceptFileFuncs,
private readonly bool $isStubGenerated,
private readonly bool $checkRequirements,
private readonly array $warnings,
private readonly array $recommendations,
) {
}

Expand Down
Loading

0 comments on commit fd86138

Please sign in to comment.