Skip to content

Commit 86df63a

Browse files
authored
[TASK] Switch the code style checks on CI to PHP 8.3
There is no such thing as a free lunch, but at least there's a free performance gain here. Also format the code according to the latest PHP-CS-Fixer version.
1 parent fadda63 commit 86df63a

7 files changed

+8
-16
lines changed

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: ubuntu-22.04
4141
strategy:
4242
matrix:
43-
php: ["8.1"]
43+
php: ["8.3"]
4444
steps:
4545
- name: Checkout repository
4646
uses: actions/checkout@v3

src/Exception/ExtensionKeyMissingException.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,4 @@
1212

1313
namespace TYPO3\Tailor\Exception;
1414

15-
class ExtensionKeyMissingException extends \InvalidArgumentException
16-
{
17-
}
15+
class ExtensionKeyMissingException extends \InvalidArgumentException {}

src/Exception/FormDataProcessingException.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,4 @@
1212

1313
namespace TYPO3\Tailor\Exception;
1414

15-
class FormDataProcessingException extends \RuntimeException
16-
{
17-
}
15+
class FormDataProcessingException extends \RuntimeException {}

src/Exception/InvalidComposerJsonException.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,4 @@
1212

1313
namespace TYPO3\Tailor\Exception;
1414

15-
class InvalidComposerJsonException extends \InvalidArgumentException
16-
{
17-
}
15+
class InvalidComposerJsonException extends \InvalidArgumentException {}

src/Exception/RequiredConfigurationMissing.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,4 @@
1212

1313
namespace TYPO3\Tailor\Exception;
1414

15-
class RequiredConfigurationMissing extends \InvalidArgumentException
16-
{
17-
}
15+
class RequiredConfigurationMissing extends \InvalidArgumentException {}

src/Filesystem/VersionReplacer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function setVersion(string $filePath, string $pattern, int $versionPartsT
4343
if ($fileContents === false) {
4444
throw new \InvalidArgumentException('The file ' . $filePath . ' could not be opened', 1605741968);
4545
}
46-
$updatedFileContents = preg_replace_callback('/' . $pattern . '/u', static function ($matches) use ($newVersion) {
46+
$updatedFileContents = preg_replace_callback('/' . $pattern . '/u', static function($matches) use ($newVersion) {
4747
return str_replace($matches[1], $newVersion, $matches[0]);
4848
}, $fileContents);
4949
file_put_contents($filePath, $updatedFileContents);

src/Service/VersionService.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function createZipArchiveFromPath(string $path): string
7171

7272
$iterator = new RecursiveDirectoryIterator($fullPath, FilesystemIterator::SKIP_DOTS);
7373
$files = new RecursiveIteratorIterator(
74-
new RecursiveCallbackFilterIterator($iterator, function ($current) use ($fullPath) {
74+
new RecursiveCallbackFilterIterator($iterator, function($current) use ($fullPath) {
7575
// @todo Find a more performant way for filtering
7676

7777
$filepath = $current->getRealPath();
@@ -204,7 +204,7 @@ protected function getVersionFilename(bool $hash = false): string
204204
{
205205
$filename = sprintf('%s/%s_%s.zip', $this->transactionPath, $this->extension, $this->version);
206206

207-
return $hash ? md5($filename): $filename;
207+
return $hash ? md5($filename) : $filename;
208208
}
209209

210210
/**

0 commit comments

Comments
 (0)