diff --git a/phpstan.neon b/phpstan.neon index e74b4290..cb50f844 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -12,7 +12,6 @@ parameters: reportUnmatchedIgnoredErrors: true ignoreErrors: - - '#Cannot instantiate interface PHPUnit\\Util\\Exception#' - "#with a nullable type declaration#" - "#type mixed is not subtype of native#" - "#is not allowed to extend#" diff --git a/src/Support/Printer.php b/src/Support/Printer.php deleted file mode 100644 index 02f74d2f..00000000 --- a/src/Support/Printer.php +++ /dev/null @@ -1,62 +0,0 @@ -stream = fsockopen($tmp[0], (int) $tmp[1]); - $this->isOpen = true; - - return; - } - - $this->isPhpStream = str_starts_with($out, 'php://'); - - if (! $this->isPhpStream && ! Filesystem::createDirectory(dirname($out))) { - throw new Exception(sprintf('Directory "%s" was not created', dirname($out))); - } - - $this->stream = fopen($out, 'wb'); - $this->isOpen = true; - } - - final public function print(string $buffer): void - { - assert($this->isOpen); - assert($this->stream !== false); - - // @phpstan-ignore-next-line - fwrite($this->stream, $buffer); - } - - final public function flush(): void - { - if ($this->isOpen && $this->isPhpStream && $this->stream !== false) { - // @phpstan-ignore-next-line - fclose($this->stream); - - $this->isOpen = false; - } - } -}