Bug report
With phpstan 1.7.5 and 1.7.6 I now get a new error reported:
After doing phpstan clear-result-cache and a full run:
php -d zend.enable_gc=0 vendor-bin/phpstan/vendor/bin/phpstan analyse --memory-limit=2G --configuration=./phpstan.neon --level=0 apps core settings lib/private lib/public ocs ocs-provider
1466/1466 100%
------ -------------------------------------------------------------------------------------------------------------
Line lib/private/Files/Cache/HomeCache.php
------ -------------------------------------------------------------------------------------------------------------
32 Non-abstract class OC\Files\Cache\HomeCache contains abstract method put() from class OC\Files\Cache\Cache.
------ -------------------------------------------------------------------------------------------------------------
[ERROR] Found 1 error
make: *** [Makefile:237: test-php-phpstan] Error 1
That is a new error. But:
https://github.com/owncloud/core/blob/master/lib/private/Files/Cache/HomeCache.php has no implementation of function put
class HomeCache extends Cache - https://github.com/owncloud/core/blob/master/lib/private/Files/Cache/Cache.php and that does have a real implementation of function put:
public function put($file, array $data) {
if (($id = $this->getId($file)) > -1) {
$this->update($id, $data);
return $id;
} else {
return $this->insert($file, $data);
}
}
class Cache implements ICache - https://github.com/owncloud/core/blob/master/lib/public/Files/Cache/ICache.php
And that has just the function definition:
public function put($file, array $data);
Am I missing something? That inheritance should be OK?
Code snippet that reproduces the problem
Expected output
phpstan passes
Did PHPStan help you today? Did it make you happy in any way?
Bug report
With phpstan 1.7.5 and 1.7.6 I now get a new error reported:
After doing
phpstan clear-result-cacheand a full run:That is a new error. But:
https://github.com/owncloud/core/blob/master/lib/private/Files/Cache/HomeCache.php has no implementation of function
putclass HomeCache extends Cache - https://github.com/owncloud/core/blob/master/lib/private/Files/Cache/Cache.php and that does have a real implementation of function
put:class Cache implements ICache - https://github.com/owncloud/core/blob/master/lib/public/Files/Cache/ICache.php
And that has just the function definition:
Am I missing something? That inheritance should be OK?
Code snippet that reproduces the problem
Expected output
phpstan passes
Did PHPStan help you today? Did it make you happy in any way?