From 7b6009ab086cb11b7f6839b37db1fadb0f7717b3 Mon Sep 17 00:00:00 2001 From: vol4onok Date: Mon, 11 Mar 2024 15:24:43 +0200 Subject: [PATCH] FRW-7467: Fixed cs --- src/Checker/DevPackagesChecker/SprykerDevPackagesChecker.php | 2 +- .../CheckerStrategy/ComposerPhpVersionStrategy.php | 4 ++-- .../CheckerStrategy/CurrentPhpVersionStrategy.php | 2 +- .../CheckerStrategy/DeployYamlFilesPhpVersionStrategy.php | 2 +- src/Fetcher/CheckerFetcher.php | 4 ++-- .../Collection/UpgradeInstructionsReleaseGroupCollection.php | 4 ++-- .../Shared/Dto/Collection/ReleaseGroupDtoCollection.php | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Checker/DevPackagesChecker/SprykerDevPackagesChecker.php b/src/Checker/DevPackagesChecker/SprykerDevPackagesChecker.php index 4a1c5c9..87df7fa 100644 --- a/src/Checker/DevPackagesChecker/SprykerDevPackagesChecker.php +++ b/src/Checker/DevPackagesChecker/SprykerDevPackagesChecker.php @@ -74,7 +74,7 @@ public function check(CheckerInputDataDto $inputData): CheckerResponseDto $devSprykerPackages = array_filter( $sprykerPackages, - static fn (string $constraint): bool => strpos($constraint, static::DEV_PACKAGE_PREFIX) === 0 + static fn (string $constraint): bool => strpos($constraint, static::DEV_PACKAGE_PREFIX) === 0, ); return new CheckerResponseDto($this->createViolations($devSprykerPackages), $this->checkerDocUrl); diff --git a/src/Checker/PhpVersionChecker/CheckerStrategy/ComposerPhpVersionStrategy.php b/src/Checker/PhpVersionChecker/CheckerStrategy/ComposerPhpVersionStrategy.php index 38fa7c3..e35406a 100644 --- a/src/Checker/PhpVersionChecker/CheckerStrategy/ComposerPhpVersionStrategy.php +++ b/src/Checker/PhpVersionChecker/CheckerStrategy/ComposerPhpVersionStrategy.php @@ -95,7 +95,7 @@ protected function compareByMask(array $allowedPhpVersions, array $composerData) { return array_filter( $allowedPhpVersions, - static fn (string $allowedVersion): bool => Semver::satisfies($allowedVersion . static::MAX_MINOR_VERSION_SUFFIX, $composerData['require']['php']) + static fn (string $allowedVersion): bool => Semver::satisfies($allowedVersion . static::MAX_MINOR_VERSION_SUFFIX, $composerData['require']['php']), ); } @@ -109,7 +109,7 @@ protected function compareByExactPhpVersion(array $allowedPhpVersions, array $co { return array_filter( $allowedPhpVersions, - static fn (string $allowedVersion): bool => strpos($composerData['require']['php'], $allowedVersion) === 0 + static fn (string $allowedVersion): bool => strpos($composerData['require']['php'], $allowedVersion) === 0, ); } diff --git a/src/Checker/PhpVersionChecker/CheckerStrategy/CurrentPhpVersionStrategy.php b/src/Checker/PhpVersionChecker/CheckerStrategy/CurrentPhpVersionStrategy.php index 80a1237..b90ceec 100644 --- a/src/Checker/PhpVersionChecker/CheckerStrategy/CurrentPhpVersionStrategy.php +++ b/src/Checker/PhpVersionChecker/CheckerStrategy/CurrentPhpVersionStrategy.php @@ -43,7 +43,7 @@ public function check(array $allowedPhpVersions, string $path): CheckerStrategyR $phpVersion = $this->currentPhpVersion; $validVersions = array_filter( $allowedPhpVersions, - static fn (string $allowedVersion): bool => strpos($phpVersion, $allowedVersion) === 0 && version_compare($phpVersion, $allowedVersion, '>=') + static fn (string $allowedVersion): bool => strpos($phpVersion, $allowedVersion) === 0 && version_compare($phpVersion, $allowedVersion, '>='), ); $violations = count($validVersions) === 0 diff --git a/src/Checker/PhpVersionChecker/CheckerStrategy/DeployYamlFilesPhpVersionStrategy.php b/src/Checker/PhpVersionChecker/CheckerStrategy/DeployYamlFilesPhpVersionStrategy.php index fe0f463..891c7ac 100644 --- a/src/Checker/PhpVersionChecker/CheckerStrategy/DeployYamlFilesPhpVersionStrategy.php +++ b/src/Checker/PhpVersionChecker/CheckerStrategy/DeployYamlFilesPhpVersionStrategy.php @@ -89,7 +89,7 @@ protected function checkDeployFile(string $fileName, array $deployStructure, arr static fn (string $version): bool => (bool)preg_match( sprintf('/[^\d.]%s/', str_replace('.', '\.', $version)), $imageTag, - ) + ), ); if (count($validVersions) === 0) { diff --git a/src/Fetcher/CheckerFetcher.php b/src/Fetcher/CheckerFetcher.php index 90290ac..ba92402 100644 --- a/src/Fetcher/CheckerFetcher.php +++ b/src/Fetcher/CheckerFetcher.php @@ -54,7 +54,7 @@ protected function filterAllowedCheckers(EvaluatorInputDataDto $inputData, array return array_filter( $checkers, - static fn (CheckerInterface $checker): bool => in_array($checker->getName(), $inputData->getCheckerNames(), true) + static fn (CheckerInterface $checker): bool => in_array($checker->getName(), $inputData->getCheckerNames(), true), ); } @@ -68,7 +68,7 @@ protected function filterExcludedCheckers(EvaluatorInputDataDto $inputData, arra { return array_filter( $checkers, - static fn (CheckerInterface $checker): bool => !in_array($checker->getName(), $inputData->getExcludedCheckerNames(), true) + static fn (CheckerInterface $checker): bool => !in_array($checker->getName(), $inputData->getExcludedCheckerNames(), true), ); } } diff --git a/src/ReleaseApp/Domain/Entities/Collection/UpgradeInstructionsReleaseGroupCollection.php b/src/ReleaseApp/Domain/Entities/Collection/UpgradeInstructionsReleaseGroupCollection.php index f3ab3b0..6b5c5c6 100644 --- a/src/ReleaseApp/Domain/Entities/Collection/UpgradeInstructionsReleaseGroupCollection.php +++ b/src/ReleaseApp/Domain/Entities/Collection/UpgradeInstructionsReleaseGroupCollection.php @@ -96,7 +96,7 @@ public function getSecurityFixes(): self return new self( array_filter( $this->elements, - fn (UpgradeInstructionsReleaseGroup $releaseGroup): bool => $releaseGroup->isSecurity() + fn (UpgradeInstructionsReleaseGroup $releaseGroup): bool => $releaseGroup->isSecurity(), ), ); } @@ -109,7 +109,7 @@ public function getNonSecurityFixes(): self return new self( array_filter( $this->elements, - fn (UpgradeInstructionsReleaseGroup $releaseGroup): bool => !$releaseGroup->isSecurity() + fn (UpgradeInstructionsReleaseGroup $releaseGroup): bool => !$releaseGroup->isSecurity(), ), ); } diff --git a/src/ReleaseApp/Infrastructure/Shared/Dto/Collection/ReleaseGroupDtoCollection.php b/src/ReleaseApp/Infrastructure/Shared/Dto/Collection/ReleaseGroupDtoCollection.php index 0b8f58f..ae708c3 100644 --- a/src/ReleaseApp/Infrastructure/Shared/Dto/Collection/ReleaseGroupDtoCollection.php +++ b/src/ReleaseApp/Infrastructure/Shared/Dto/Collection/ReleaseGroupDtoCollection.php @@ -91,7 +91,7 @@ public function getSecurityFixes(): self return new self( array_filter( $this->elements, - fn (ReleaseGroupDto $releaseGroup): bool => $releaseGroup->isSecurity() + fn (ReleaseGroupDto $releaseGroup): bool => $releaseGroup->isSecurity(), ), ); }