Remove phpstan errors from the rest of the code

[MAILPOET-3235]
This commit is contained in:
Jan Lysý
2021-01-12 12:15:35 +01:00
committed by Veljko V
parent 479f2cf198
commit 4390a1932d
9 changed files with 27 additions and 9 deletions

View File

@ -32,7 +32,7 @@ class TablePrefixMetadataFactory extends ClassMetadataFactory {
// prefix tables only after they are saved to cache so the prefix does not get included in cache
// (getMetadataFor can call itself recursively but it saves to cache only after the recursive calls)
$isCached = $this->getCacheDriver()->contains($classMetadata->getName() . $this->cacheSalt);
$isCached = ($cache = $this->getCacheDriver()) ? $cache->contains($classMetadata->getName() . $this->cacheSalt) : false;
if ($classMetadata instanceof ClassMetadata && $isCached) {
$this->addPrefix($classMetadata);
$this->prefixedMap[$classMetadata->getName()] = true;