Skip to content

Commit 8198969

Browse files
committed
fix: adapt for strict type php8
1 parent 9b4da7d commit 8198969

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Helper/Shell.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ class Shell
5858
/** @var resource The actual process resource returned from proc_open */
5959
protected $process = null;
6060

61-
/** @var int Process starting time in unix timestamp */
62-
protected int $processStartTime = 0;
61+
/** @var float Process starting time in unix timestamp */
62+
protected float $processStartTime = 0;
6363

6464
/** @var array Status of the process as returned from proc_get_status */
6565
protected ?array $processStatus = null;
@@ -104,7 +104,7 @@ protected function isWindows(): bool
104104

105105
protected function setInput(): void
106106
{
107-
\fwrite($this->pipes[self::STDIN_DESCRIPTOR_KEY], $this->input);
107+
\fwrite($this->pipes[self::STDIN_DESCRIPTOR_KEY], $this->input ?? '');
108108
}
109109

110110
protected function updateProcessStatus(): void

src/Output/Writer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function colorizer(): Color
200200
*/
201201
public function __get(string $name): self
202202
{
203-
if (\strpos($this->method, $name) === false) {
203+
if ($this->method === null || !\str_contains($this->method, $name)) {
204204
$this->method .= $this->method ? \ucfirst($name) : $name;
205205
}
206206

0 commit comments

Comments
 (0)