Add phpstan until level 7

This commit is contained in:
Antoine Lamirault committed 2021-09-18 18:09:14 +02:00
1 parent ab973cab34
commit bfb7c2c68f
114 files changed
+527 -319

No files matched your search

+16 -6
View File
@@ -14,22 +14,25 @@ class SpoutTestStream
const PATH_TO_CSV_RESOURCES = 'tests/resources/csv/';
const CSV_EXTENSION = '.csv';
/** @var int $position */
/** @var int */
private $position;
/** @var resource $fileHandle */
/** @var resource */
private $fileHandle;
/**
* @param string $path
* @param int $flag
* @return array
* @return array<mixed>
*/
public function url_stat($path, $flag)
{
$filePath = $this->getFilePathFromStreamPath($path);
return stat($filePath);
/** @var array<mixed> $stat */
$stat = stat($filePath);
return $stat;
}
/**
@@ -56,7 +59,11 @@ class SpoutTestStream
// the path is like "spout://csv_name" so the actual file name correspond the name of the host.
$filePath = $this->getFilePathFromStreamPath($path);
$this->fileHandle = fopen($filePath, $mode);
/** @var resource $fileHandle */
$fileHandle = fopen($filePath, $mode);
$this->fileHandle = $fileHandle;
return true;
}
@@ -69,7 +76,10 @@ class SpoutTestStream
{
$this->position += $numBytes;
return fread($this->fileHandle, $numBytes);
/** @var string $read */
$read = fread($this->fileHandle, $numBytes);
return $read;
}
/**