Skip to content

Commit

Permalink
Combined Updates (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen authored Dec 22, 2023
1 parent c29489f commit db943cf
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/part_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/part_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpdocumentor" version="^3.3.1" installed="3.3.1" location="./tools/phpdocumentor" copy="false"/>
<phar name="phpdocumentor" version="^3.3.1" installed="3.4.3" location="./tools/phpdocumentor" copy="false"/>
</phive>
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
php 8.2.5
php 8.3.1
4 changes: 1 addition & 3 deletions src/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

namespace ZipStream;

abstract class Exception extends \Exception
{
}
abstract class Exception extends \Exception {}
3 changes: 1 addition & 2 deletions src/PackField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/ZipStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public function addFile(
): void {
$this->addFileFromCallback(
fileName: $fileName,
callback: fn () => $data,
callback: fn() => $data,
comment: $comment,
compressionMethod: $compressionMethod,
deflateLevel: $deflateLevel,
Expand Down Expand Up @@ -394,7 +394,7 @@ public function addFileFromStream(
): void {
$this->addFileFromCallback(
fileName: $fileName,
callback: fn () => $stream,
callback: fn() => $stream,
comment: $comment,
compressionMethod: $compressionMethod,
deflateLevel: $deflateLevel,
Expand Down Expand Up @@ -473,7 +473,7 @@ public function addFileFromPsr7Stream(
): void {
$this->addFileFromCallback(
fileName: $fileName,
callback: fn () => $stream,
callback: fn() => $stream,
comment: $comment,
compressionMethod: $compressionMethod,
deflateLevel: $deflateLevel,
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 1 addition & 3 deletions test/EndlessCycleStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
3 changes: 1 addition & 2 deletions test/ResourceStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public function __construct(
* @var resource
*/
private $stream
) {
}
) {}

public function __toString(): string
{
Expand Down
8 changes: 2 additions & 6 deletions test/ZipStreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit db943cf

Please sign in to comment.