Skip to content

Commit

Permalink
Update PHPDoc typing for PHPStan 2, adjust CI PHP versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mishagp committed Dec 15, 2024
1 parent f1c7f33 commit 2bbcac1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
php-version: [ 8.0, 8.1, 8.2, 8.3 ]
php-version: [ 8.1, 8.2, 8.3, 8.4 ]

steps:
- name: Checkout Repository
Expand Down
17 changes: 14 additions & 3 deletions src/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,19 @@

class Process
{
/**
* @var ?resource $stdin
*/
private mixed $stdin;

/**
* @var ?resource $stdout
*/
private mixed $stdout;

/**
* @var ?resource $stderr
*/
private mixed $stderr;
private mixed $handle;

Expand Down Expand Up @@ -125,13 +136,13 @@ public function closeStdin(): void
}

/**
* @param resource $stream
* @param resource|null $stream
*/
private function closeStream(&$stream): void
{
if ($stream !== NULL) {
if (is_resource($stream) && get_resource_type($stream) === 'stream') {
fclose($stream);
$stream = NULL;
$stream = null;
}
}
}

0 comments on commit 2bbcac1

Please sign in to comment.