Installed phpstan-dcotrine and fixed more static analysis errors

This commit is contained in:
Alejandro Celaya
2021-07-20 13:29:50 +02:00
parent 95770ac104
commit 02fd28edec
9 changed files with 31 additions and 13 deletions

View File

@@ -57,7 +57,6 @@ class DomainService implements DomainServiceInterface
public function getOrCreate(string $authority): Domain
{
$repo = $this->em->getRepository(Domain::class);
/** @var Domain|null $domain */
$domain = $repo->findOneBy(['authority' => $authority]) ?? new Domain($authority);
$this->em->persist($domain);

View File

@@ -28,7 +28,7 @@ class ImportedLinksProcessor implements ImportedLinksProcessorInterface
private ShortCodeHelperInterface $shortCodeHelper,
private DoctrineBatchHelperInterface $batchHelper
) {
$this->shortUrlRepo = $this->em->getRepository(ShortUrl::class); // @phpstan-ignore-line
$this->shortUrlRepo = $this->em->getRepository(ShortUrl::class);
}
/**