Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.4 checks in CI #7

Merged
merged 5 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
on:
- pull_request
- push
pull_request: null
push:
branches:
- master

name: CI

Expand All @@ -12,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate
Expand All @@ -31,7 +33,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -47,17 +49,14 @@ jobs:
- name: Static Analyzer (PHPStan)
run: composer test:phpstan

- name: Static Analyzer (Psalm)
run: composer test:psalm

Tests:
strategy:
matrix:
php-versions: ['8.0', '8.1', '8.2', '8.3']
php-versions: ['8.0', '8.1', '8.2', '8.3', '8.4']
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate
Expand All @@ -76,7 +75,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.2.0] - 2024-11-27

### Added
- Support for PHP 8.4

### Removed
- Psalm

## [2.1.0] - 2023-09-23

# Added

- Support PHP 8.2 (#3, thanks @devnix)
- More specific return type for `Flowcontrol\React\Inotify\InotifyStream::addWatch` (#4, thanks @devnix)

# Fixed

- GitHub Action Badge in `README.md`

## [2.0.0] - 2022-01-06

### Added
Expand Down Expand Up @@ -59,6 +78,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- unit tests
- static code analysis using Pslam and PHPStan

[2.2.0]: https://github.com/flow-control/react-inotify/compare/v2.1.0...v2.2.0
[2.1.0]: https://github.com/flow-control/react-inotify/compare/v2.0.0...v2.1.0
[2.0.0]: https://github.com/flow-control/react-inotify/compare/v1.1.1...v2.0.0
[1.1.1]: https://github.com/flow-control/react-inotify/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/flow-control/react-inotify/compare/v1.0.2...v1.1.0
Expand Down
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"require-dev": {
"phpunit/phpunit": "^8.5|^9.5",
"phpstan/phpstan": "^1.0.0",
"infection/infection": "<1.0",
"vimeo/psalm": "^5.0"
"infection/infection": "<1.0"
},
"autoload": {
"psr-4": {
Expand All @@ -29,7 +28,6 @@
"fix": "./tools/php-cs-fixer.phar fix",
"test:lint": "./tools/php-cs-fixer.phar fix --dry-run",
"test:phpstan": "phpstan analyse --level max examples/ src/",
"test:psalm": "psalm src/ examples/",
"test:unit": [
"@putenv XDEBUG_MODE=coverage",
"phpunit"
Expand All @@ -41,7 +39,6 @@
"test": [
"@test:lint",
"@test:phpstan",
"@test:psalm",
"@test:unit",
"@test:mutation"
]
Expand Down
58 changes: 0 additions & 58 deletions psalm.xml

This file was deleted.

4 changes: 0 additions & 4 deletions src/InotifyStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,12 @@
*/
private $watchers = [];

/**
* @psalm-suppress RedundantConditionGivenDocblockType
* @psalm-suppress DocblockTypeContradiction
*/
public function __construct(?LoopInterface $loop = null)
{
$inotify = inotify_init();

if (
!is_resource($inotify) ||

Check warning on line 46 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.1)

Escaped Mutant for Mutator "LogicalOr": @@ @@ public function __construct(?LoopInterface $loop = null) { $inotify = inotify_init(); - if (!is_resource($inotify) || get_resource_type($inotify) !== 'stream') { + if (!is_resource($inotify) && get_resource_type($inotify) !== 'stream') { throw new InvalidArgumentException('Call to `inotify_init()` did not succeed'); } // this class relies on non-blocking I/O in order to not interrupt

Check warning on line 46 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.0)

Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ public function __construct(?LoopInterface $loop = null) { $inotify = inotify_init(); - if (!is_resource($inotify) || get_resource_type($inotify) !== 'stream') { + if (!is_resource($inotify) && get_resource_type($inotify) !== 'stream') { throw new InvalidArgumentException('Call to `inotify_init()` did not succeed'); } // this class relies on non-blocking I/O in order to not interrupt

Check warning on line 46 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.4)

Escaped Mutant for Mutator "LogicalOr": @@ @@ public function __construct(?LoopInterface $loop = null) { $inotify = inotify_init(); - if (!is_resource($inotify) || get_resource_type($inotify) !== 'stream') { + if (!is_resource($inotify) && get_resource_type($inotify) !== 'stream') { throw new InvalidArgumentException('Call to `inotify_init()` did not succeed'); } // this class relies on non-blocking I/O in order to not interrupt

Check warning on line 46 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.3)

Escaped Mutant for Mutator "LogicalOr": @@ @@ public function __construct(?LoopInterface $loop = null) { $inotify = inotify_init(); - if (!is_resource($inotify) || get_resource_type($inotify) !== 'stream') { + if (!is_resource($inotify) && get_resource_type($inotify) !== 'stream') { throw new InvalidArgumentException('Call to `inotify_init()` did not succeed'); } // this class relies on non-blocking I/O in order to not interrupt

Check warning on line 46 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.2)

Escaped Mutant for Mutator "LogicalOr": @@ @@ public function __construct(?LoopInterface $loop = null) { $inotify = inotify_init(); - if (!is_resource($inotify) || get_resource_type($inotify) !== 'stream') { + if (!is_resource($inotify) && get_resource_type($inotify) !== 'stream') { throw new InvalidArgumentException('Call to `inotify_init()` did not succeed'); } // this class relies on non-blocking I/O in order to not interrupt
get_resource_type($inotify) !== 'stream'
) {
throw new InvalidArgumentException(
Expand All @@ -58,7 +54,7 @@
// this class relies on non-blocking I/O in order to not interrupt
// the event loop e.g. pipes on Windows do not support this:
// https://bugs.php.net/bug.php?id=47918
if (stream_set_blocking($inotify, false) !== true) {

Check warning on line 57 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.1)

Escaped Mutant for Mutator "FalseValue": @@ @@ // this class relies on non-blocking I/O in order to not interrupt // the event loop e.g. pipes on Windows do not support this: // https://bugs.php.net/bug.php?id=47918 - if (stream_set_blocking($inotify, false) !== true) { + if (stream_set_blocking($inotify, true) !== true) { throw new RuntimeException('Unable to set stream resource to non-blocking mode'); } // Use unbuffered read operations on the underlying stream resource.

Check warning on line 57 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.0)

Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ // this class relies on non-blocking I/O in order to not interrupt // the event loop e.g. pipes on Windows do not support this: // https://bugs.php.net/bug.php?id=47918 - if (stream_set_blocking($inotify, false) !== true) { + if (stream_set_blocking($inotify, true) !== true) { throw new RuntimeException('Unable to set stream resource to non-blocking mode'); } // Use unbuffered read operations on the underlying stream resource.

Check warning on line 57 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.4)

Escaped Mutant for Mutator "FalseValue": @@ @@ // this class relies on non-blocking I/O in order to not interrupt // the event loop e.g. pipes on Windows do not support this: // https://bugs.php.net/bug.php?id=47918 - if (stream_set_blocking($inotify, false) !== true) { + if (stream_set_blocking($inotify, true) !== true) { throw new RuntimeException('Unable to set stream resource to non-blocking mode'); } // Use unbuffered read operations on the underlying stream resource.

Check warning on line 57 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.3)

Escaped Mutant for Mutator "FalseValue": @@ @@ // this class relies on non-blocking I/O in order to not interrupt // the event loop e.g. pipes on Windows do not support this: // https://bugs.php.net/bug.php?id=47918 - if (stream_set_blocking($inotify, false) !== true) { + if (stream_set_blocking($inotify, true) !== true) { throw new RuntimeException('Unable to set stream resource to non-blocking mode'); } // Use unbuffered read operations on the underlying stream resource.

Check warning on line 57 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.2)

Escaped Mutant for Mutator "FalseValue": @@ @@ // this class relies on non-blocking I/O in order to not interrupt // the event loop e.g. pipes on Windows do not support this: // https://bugs.php.net/bug.php?id=47918 - if (stream_set_blocking($inotify, false) !== true) { + if (stream_set_blocking($inotify, true) !== true) { throw new RuntimeException('Unable to set stream resource to non-blocking mode'); } // Use unbuffered read operations on the underlying stream resource.
throw new RuntimeException(
'Unable to set stream resource to non-blocking mode'
);
Expand All @@ -70,25 +66,25 @@
// trigger events on (edge triggered).
// This does not affect the default event loop implementation (level
// triggered), so we can ignore platforms not supporting this (HHVM).
if (function_exists('stream_set_read_buffer')) {

Check warning on line 69 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.1)

Escaped Mutant for Mutator "IfNegation": @@ @@ // trigger events on (edge triggered). // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). - if (function_exists('stream_set_read_buffer')) { + if (!function_exists('stream_set_read_buffer')) { stream_set_read_buffer($inotify, 0); } $this->inotify = $inotify;

Check warning on line 69 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.4)

Escaped Mutant for Mutator "IfNegation": @@ @@ // trigger events on (edge triggered). // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). - if (function_exists('stream_set_read_buffer')) { + if (!function_exists('stream_set_read_buffer')) { stream_set_read_buffer($inotify, 0); } $this->inotify = $inotify;

Check warning on line 69 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.3)

Escaped Mutant for Mutator "IfNegation": @@ @@ // trigger events on (edge triggered). // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). - if (function_exists('stream_set_read_buffer')) { + if (!function_exists('stream_set_read_buffer')) { stream_set_read_buffer($inotify, 0); } $this->inotify = $inotify;

Check warning on line 69 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.2)

Escaped Mutant for Mutator "IfNegation": @@ @@ // trigger events on (edge triggered). // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). - if (function_exists('stream_set_read_buffer')) { + if (!function_exists('stream_set_read_buffer')) { stream_set_read_buffer($inotify, 0); } $this->inotify = $inotify;
stream_set_read_buffer($inotify, 0);

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.1)

Escaped Mutant for Mutator "DecrementInteger": @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + stream_set_read_buffer($inotify, -1); } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.1)

Escaped Mutant for Mutator "IncrementInteger": @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + stream_set_read_buffer($inotify, 1); } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.1)

Escaped Mutant for Mutator "FunctionCallRemoval": @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.0)

Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + stream_set_read_buffer($inotify, -1); } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.0)

Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + stream_set_read_buffer($inotify, 1); } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.0)

Escaped Mutant for Mutator "FunctionCallRemoval": --- Original +++ New @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.4)

Escaped Mutant for Mutator "DecrementInteger": @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + stream_set_read_buffer($inotify, -1); } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.4)

Escaped Mutant for Mutator "IncrementInteger": @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + stream_set_read_buffer($inotify, 1); } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.4)

Escaped Mutant for Mutator "FunctionCallRemoval": @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.3)

Escaped Mutant for Mutator "DecrementInteger": @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + stream_set_read_buffer($inotify, -1); } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.3)

Escaped Mutant for Mutator "IncrementInteger": @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + stream_set_read_buffer($inotify, 1); } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.3)

Escaped Mutant for Mutator "FunctionCallRemoval": @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.2)

Escaped Mutant for Mutator "DecrementInteger": @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + stream_set_read_buffer($inotify, -1); } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.2)

Escaped Mutant for Mutator "IncrementInteger": @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + stream_set_read_buffer($inotify, 1); } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 70 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.2)

Escaped Mutant for Mutator "FunctionCallRemoval": @@ @@ // This does not affect the default event loop implementation (level // triggered), so we can ignore platforms not supporting this (HHVM). if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($inotify, 0); + } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get();
}

$this->inotify = $inotify;
$this->loop = $loop ?? \React\EventLoop\Loop::get();

Check warning on line 74 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.1)

Escaped Mutant for Mutator "Coalesce": @@ @@ stream_set_read_buffer($inotify, 0); } $this->inotify = $inotify; - $this->loop = $loop ?? \React\EventLoop\Loop::get(); + $this->loop = \React\EventLoop\Loop::get() ?? $loop; $this->loop->addReadStream($this->inotify, [$this, 'handleData']); } public function __destruct()

Check warning on line 74 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.0)

Escaped Mutant for Mutator "Coalesce": --- Original +++ New @@ @@ stream_set_read_buffer($inotify, 0); } $this->inotify = $inotify; - $this->loop = $loop ?? \React\EventLoop\Loop::get(); + $this->loop = \React\EventLoop\Loop::get() ?? $loop; $this->loop->addReadStream($this->inotify, [$this, 'handleData']); } public function __destruct()

Check warning on line 74 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.4)

Escaped Mutant for Mutator "Coalesce": @@ @@ stream_set_read_buffer($inotify, 0); } $this->inotify = $inotify; - $this->loop = $loop ?? \React\EventLoop\Loop::get(); + $this->loop = \React\EventLoop\Loop::get() ?? $loop; $this->loop->addReadStream($this->inotify, [$this, 'handleData']); } public function __destruct()

Check warning on line 74 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.3)

Escaped Mutant for Mutator "Coalesce": @@ @@ stream_set_read_buffer($inotify, 0); } $this->inotify = $inotify; - $this->loop = $loop ?? \React\EventLoop\Loop::get(); + $this->loop = \React\EventLoop\Loop::get() ?? $loop; $this->loop->addReadStream($this->inotify, [$this, 'handleData']); } public function __destruct()

Check warning on line 74 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.2)

Escaped Mutant for Mutator "Coalesce": @@ @@ stream_set_read_buffer($inotify, 0); } $this->inotify = $inotify; - $this->loop = $loop ?? \React\EventLoop\Loop::get(); + $this->loop = \React\EventLoop\Loop::get() ?? $loop; $this->loop->addReadStream($this->inotify, [$this, 'handleData']); } public function __destruct()

$this->loop->addReadStream($this->inotify, [$this, 'handleData']);

Check warning on line 76 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.1)

Escaped Mutant for Mutator "ArrayItemRemoval": @@ @@ } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get(); - $this->loop->addReadStream($this->inotify, [$this, 'handleData']); + $this->loop->addReadStream($this->inotify, ['handleData']); } public function __destruct() {

Check warning on line 76 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.1)

Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get(); - $this->loop->addReadStream($this->inotify, [$this, 'handleData']); + } public function __destruct() {

Check warning on line 76 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.0)

Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get(); - $this->loop->addReadStream($this->inotify, [$this, 'handleData']); + $this->loop->addReadStream($this->inotify, ['handleData']); } public function __destruct() {

Check warning on line 76 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.0)

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get(); - $this->loop->addReadStream($this->inotify, [$this, 'handleData']); + } public function __destruct() {

Check warning on line 76 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.4)

Escaped Mutant for Mutator "ArrayItemRemoval": @@ @@ } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get(); - $this->loop->addReadStream($this->inotify, [$this, 'handleData']); + $this->loop->addReadStream($this->inotify, ['handleData']); } public function __destruct() {

Check warning on line 76 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.4)

Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get(); - $this->loop->addReadStream($this->inotify, [$this, 'handleData']); + } public function __destruct() {

Check warning on line 76 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.3)

Escaped Mutant for Mutator "ArrayItemRemoval": @@ @@ } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get(); - $this->loop->addReadStream($this->inotify, [$this, 'handleData']); + $this->loop->addReadStream($this->inotify, ['handleData']); } public function __destruct() {

Check warning on line 76 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.3)

Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get(); - $this->loop->addReadStream($this->inotify, [$this, 'handleData']); + } public function __destruct() {

Check warning on line 76 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.2)

Escaped Mutant for Mutator "ArrayItemRemoval": @@ @@ } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get(); - $this->loop->addReadStream($this->inotify, [$this, 'handleData']); + $this->loop->addReadStream($this->inotify, ['handleData']); } public function __destruct() {

Check warning on line 76 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.2)

Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ } $this->inotify = $inotify; $this->loop = $loop ?? \React\EventLoop\Loop::get(); - $this->loop->addReadStream($this->inotify, [$this, 'handleData']); + } public function __destruct() {
}

public function __destruct()
{
$this->loop->removeReadStream($this->inotify);

Check warning on line 81 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.1)

Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ } public function __destruct() { - $this->loop->removeReadStream($this->inotify); + if (is_resource($this->inotify)) { fclose($this->inotify); }

Check warning on line 81 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.0)

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } public function __destruct() { - $this->loop->removeReadStream($this->inotify); + if (is_resource($this->inotify)) { fclose($this->inotify); }

Check warning on line 81 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.4)

Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ } public function __destruct() { - $this->loop->removeReadStream($this->inotify); + if (is_resource($this->inotify)) { fclose($this->inotify); }

Check warning on line 81 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.3)

Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ } public function __destruct() { - $this->loop->removeReadStream($this->inotify); + if (is_resource($this->inotify)) { fclose($this->inotify); }

Check warning on line 81 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.2)

Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ } public function __destruct() { - $this->loop->removeReadStream($this->inotify); + if (is_resource($this->inotify)) { fclose($this->inotify); }

if (is_resource($this->inotify)) {
fclose($this->inotify);
}
$this->emit('close');
$this->removeAllListeners();

Check warning on line 87 in src/InotifyStream.php

View workflow job for this annotation

GitHub Actions / Tests (8.0)

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ fclose($this->inotify); } $this->emit('close'); - $this->removeAllListeners(); + } /** * @return false|int<1, max>
}

/**
Expand Down
Loading