Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -35,6 +35,16 @@ class UnixPipes extends AbstractPipes
parent::__construct($input);
}
public function __sleep(): array
{
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
}
public function __wakeup()
{
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
}
public function __destruct()
{
$this->close();
@@ -43,7 +53,7 @@ class UnixPipes extends AbstractPipes
/**
* {@inheritdoc}
*/
public function getDescriptors()
public function getDescriptors(): array
{
if (!$this->haveReadSupport) {
$nullstream = fopen('/dev/null', 'c');
@@ -81,7 +91,7 @@ class UnixPipes extends AbstractPipes
/**
* {@inheritdoc}
*/
public function getFiles()
public function getFiles(): array
{
return [];
}
@@ -89,7 +99,7 @@ class UnixPipes extends AbstractPipes
/**
* {@inheritdoc}
*/
public function readAndWrite($blocking, $close = false)
public function readAndWrite(bool $blocking, bool $close = false): array
{
$this->unblock();
$w = $this->write();
@@ -118,7 +128,7 @@ class UnixPipes extends AbstractPipes
$read[$type = array_search($pipe, $this->pipes, true)] = '';
do {
$data = fread($pipe, self::CHUNK_SIZE);
$data = @fread($pipe, self::CHUNK_SIZE);
$read[$type] .= $data;
} while (isset($data[0]) && ($close || isset($data[self::CHUNK_SIZE - 1])));
@@ -138,7 +148,7 @@ class UnixPipes extends AbstractPipes
/**
* {@inheritdoc}
*/
public function haveReadSupport()
public function haveReadSupport(): bool
{
return $this->haveReadSupport;
}
@@ -146,7 +156,7 @@ class UnixPipes extends AbstractPipes
/**
* {@inheritdoc}
*/
public function areOpen()
public function areOpen(): bool
{
return (bool) $this->pipes;
}