Skip to content

Commit

Permalink
fix: adapt for strict type php8
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Oct 2, 2022
1 parent 9b4da7d commit 8198969
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Helper/Shell.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class Shell
/** @var resource The actual process resource returned from proc_open */
protected $process = null;

/** @var int Process starting time in unix timestamp */
protected int $processStartTime = 0;
/** @var float Process starting time in unix timestamp */
protected float $processStartTime = 0;

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

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

protected function updateProcessStatus(): void
Expand Down
2 changes: 1 addition & 1 deletion src/Output/Writer.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public function colorizer(): Color
*/
public function __get(string $name): self
{
if (\strpos($this->method, $name) === false) {
if ($this->method === null || !\str_contains($this->method, $name)) {
$this->method .= $this->method ? \ucfirst($name) : $name;
}

Expand Down

0 comments on commit 8198969

Please sign in to comment.