The expression return $this->cache could return the type null which is incompatible with the type-hinted return Yiisoft\Cache\CacheInterface. Consider adding an additional type-check to rule them out.
The expression return $this->createMock...ectionInterface::class) returns the type PHPUnit\Framework\MockObject\MockObject which is incompatible with the type-hinted return Yiisoft\Db\Connection\ConnectionInterface.
Loading history...
32
}
33
34
public static function queryHelper(): QueryHelper
35
{
36
return new QueryHelper();
37
}
38
39
public function schemaCache(): SchemaCache
40
{
41
if ($this->schemaCache === null) {
42
$this->schemaCache = new SchemaCache($this->cache());
The expression return $this->schemaCache could return the type null which is incompatible with the type-hinted return Yiisoft\Db\Cache\SchemaCache. Consider adding an additional type-check to rule them out.