diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 2c7c957e..9030ad99 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,25 +1,5 @@ parameters: ignoreErrors: - - - message: "#^Call to function is_resource\\(\\) with string will always evaluate to false\\.$#" - count: 2 - path: src/Gaufrette/Adapter/AwsS3.php - - - - message: "#^Method Gaufrette\\\\Adapter\\\\AwsS3\\:\\:write\\(\\) should return bool\\|int but returns string\\.$#" - count: 1 - path: src/Gaufrette/Adapter/AwsS3.php - - - - message: "#^Method Gaufrette\\\\Adapter\\\\AwsS3\\:\\:size\\(\\) should return int but returns false\\.$#" - count: 1 - path: src/Gaufrette/Adapter/AwsS3.php - - - - message: "#^Method Gaufrette\\\\Adapter\\\\AwsS3\\:\\:mimeType\\(\\) should return string but returns false\\.$#" - count: 1 - path: src/Gaufrette/Adapter/AwsS3.php - - message: "#^Parameter \\$options of method Gaufrette\\\\Adapter\\\\AzureBlobStorage\\:\\:deleteContainer\\(\\) has invalid typehint type MicrosoftAzure\\\\Storage\\\\Blob\\\\Models\\\\DeleteContainerOptions\\.$#" count: 2 diff --git a/src/Gaufrette/Adapter/AwsS3.php b/src/Gaufrette/Adapter/AwsS3.php index 185446fd..decf8842 100644 --- a/src/Gaufrette/Adapter/AwsS3.php +++ b/src/Gaufrette/Adapter/AwsS3.php @@ -162,7 +162,7 @@ public function mtime(string $key): int|bool /** * {@inheritdoc} */ - public function size(string $key): int + public function size(string $key): bool|int { try { $result = $this->service->headObject($this->getOptions($key)); diff --git a/src/Gaufrette/Adapter/SizeCalculator.php b/src/Gaufrette/Adapter/SizeCalculator.php index fa1e0810..e08a9d2a 100644 --- a/src/Gaufrette/Adapter/SizeCalculator.php +++ b/src/Gaufrette/Adapter/SizeCalculator.php @@ -10,7 +10,7 @@ interface SizeCalculator { /** - * Returns the size of the specified key. + * @return false|int size of the specified key. */ - public function size(string $key): int; + public function size(string $key): bool|int; }