diff --git a/.github/workflows/part_docs.yml b/.github/workflows/part_docs.yml index 300c208..1aa739f 100644 --- a/.github/workflows/part_docs.yml +++ b/.github/workflows/part_docs.yml @@ -24,7 +24,7 @@ jobs: id: setup-php uses: shivammathur/setup-php@v2 with: - php-version: "8.1" + php-version: "8.3" tools: phive - name: Cache Tools uses: actions/cache@v3 diff --git a/.github/workflows/part_test.yml b/.github/workflows/part_test.yml index 786ddcf..1933a2f 100644 --- a/.github/workflows/part_test.yml +++ b/.github/workflows/part_test.yml @@ -14,17 +14,17 @@ jobs: strategy: fail-fast: false matrix: - php: ["8.1", "8.2"] + php: ["8.1", "8.2", "8.3"] os: [ubuntu-latest] experimental: [false] include: - php: nightly os: ubuntu-latest experimental: true - - php: "8.2" + - php: "8.3" os: windows-latest experimental: false - - php: 8.2 + - php: "8.3" os: macos-latest experimental: false @@ -100,7 +100,7 @@ jobs: id: setup-php uses: shivammathur/setup-php@v2 with: - php-version: "8.2" + php-version: "8.3" - name: Get composer cache directory id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT @@ -132,7 +132,7 @@ jobs: id: setup-php uses: shivammathur/setup-php@v2 with: - php-version: "8.2" + php-version: "8.3" - name: Get composer cache directory id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT diff --git a/.phive/phars.xml b/.phive/phars.xml index 569106a..183927b 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,4 +1,4 @@ - + diff --git a/.tool-versions b/.tool-versions index 2618178..4a3dc9d 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -php 8.2.5 +php 8.3.1 diff --git a/src/Exception.php b/src/Exception.php index 27f4f30..2e81e30 100644 --- a/src/Exception.php +++ b/src/Exception.php @@ -4,6 +4,4 @@ namespace ZipStream; -abstract class Exception extends \Exception -{ -} +abstract class Exception extends \Exception {} diff --git a/src/PackField.php b/src/PackField.php index 3370dd8..3ff48da 100644 --- a/src/PackField.php +++ b/src/PackField.php @@ -19,8 +19,7 @@ class PackField public function __construct( public readonly string $format, public readonly int|string $value - ) { - } + ) {} /** * Create a format string and argument list for pack(), then call diff --git a/src/ZipStream.php b/src/ZipStream.php index ecd4340..e22710e 100644 --- a/src/ZipStream.php +++ b/src/ZipStream.php @@ -263,7 +263,7 @@ public function addFile( ): void { $this->addFileFromCallback( fileName: $fileName, - callback: fn () => $data, + callback: fn() => $data, comment: $comment, compressionMethod: $compressionMethod, deflateLevel: $deflateLevel, @@ -394,7 +394,7 @@ public function addFileFromStream( ): void { $this->addFileFromCallback( fileName: $fileName, - callback: fn () => $stream, + callback: fn() => $stream, comment: $comment, compressionMethod: $compressionMethod, deflateLevel: $deflateLevel, @@ -473,7 +473,7 @@ public function addFileFromPsr7Stream( ): void { $this->addFileFromCallback( fileName: $fileName, - callback: fn () => $stream, + callback: fn() => $stream, comment: $comment, compressionMethod: $compressionMethod, deflateLevel: $deflateLevel, @@ -581,7 +581,7 @@ public function addFileFromCallback( if ($maxSize !== null && fwrite($stream, $data, $maxSize) === false) { // @codeCoverageIgnoreStart throw new ResourceActionException('fwrite', $stream); - // @codeCoverageIgnoreEnd + // @codeCoverageIgnoreEnd } elseif (fwrite($stream, $data) === false) { // @codeCoverageIgnoreStart throw new ResourceActionException('fwrite', $stream); diff --git a/test/EndlessCycleStream.php b/test/EndlessCycleStream.php index 4f1cf5c..3152eee 100644 --- a/test/EndlessCycleStream.php +++ b/test/EndlessCycleStream.php @@ -11,9 +11,7 @@ class EndlessCycleStream implements StreamInterface { private int $offset = 0; - public function __construct(private readonly string $toRepeat = '0') - { - } + public function __construct(private readonly string $toRepeat = '0') {} public function __toString(): string { diff --git a/test/ResourceStream.php b/test/ResourceStream.php index 8a41471..c33d02b 100644 --- a/test/ResourceStream.php +++ b/test/ResourceStream.php @@ -17,8 +17,7 @@ public function __construct( * @var resource */ private $stream - ) { - } + ) {} public function __toString(): string { diff --git a/test/ZipStreamTest.php b/test/ZipStreamTest.php index bb8abb7..fbbe533 100644 --- a/test/ZipStreamTest.php +++ b/test/ZipStreamTest.php @@ -954,13 +954,9 @@ public function __toString(): string return 'test'; } - public function close(): void - { - } + public function close(): void {} - public function detach() - { - } + public function detach() {} public function getSize(): ?int {