Fixed PHPStan errors.

This commit is contained in:
Jan Böhmer 2020-02-29 22:57:25 +01:00
parent f604022e49
commit 15d25cf2b2
4 changed files with 5 additions and 4 deletions

View file

@ -138,7 +138,6 @@ class PartController extends AbstractController
* @param Request $request * @param Request $request
* @param EntityManagerInterface $em * @param EntityManagerInterface $em
* @param TranslatorInterface $translator * @param TranslatorInterface $translator
* @param AttachmentManager $attachmentHelper
* @param AttachmentSubmitHandler $attachmentSubmitHandler * @param AttachmentSubmitHandler $attachmentSubmitHandler
* @return Response * @return Response
*/ */

View file

@ -47,6 +47,8 @@ class IconLinkColumn extends AbstractColumn
$resolver->setAllowedTypes('title', ['null', 'string', 'callable']); $resolver->setAllowedTypes('title', ['null', 'string', 'callable']);
$resolver->setAllowedTypes('icon', ['null', 'string', 'callable']); $resolver->setAllowedTypes('icon', ['null', 'string', 'callable']);
$resolver->setAllowedTypes('href', ['null', 'string', 'callable']); $resolver->setAllowedTypes('href', ['null', 'string', 'callable']);
return $this;
} }
public function render($value, $context) public function render($value, $context)

View file

@ -126,11 +126,11 @@ class EntityURLGenerator
/** /**
* Gets the URL to view the given element at a given timestamp * Gets the URL to view the given element at a given timestamp
* @param $entity * @param AbstractDBElement $entity
* @param \DateTime $dateTime * @param \DateTime $dateTime
* @return string * @return string
*/ */
public function timeTravelURL($entity, \DateTime $dateTime): string public function timeTravelURL(AbstractDBElement $entity, \DateTime $dateTime): string
{ {
if ($entity instanceof Part) { if ($entity instanceof Part) {
return $this->urlGenerator->generate('part_info', [ return $this->urlGenerator->generate('part_info', [

View file

@ -22,6 +22,7 @@
namespace App\Services\LogSystem; namespace App\Services\LogSystem;
use App\Entity\Attachments\AttachmentType;
use App\Entity\Base\AbstractDBElement; use App\Entity\Base\AbstractDBElement;
use App\Entity\Base\AbstractStructuralDBElement; use App\Entity\Base\AbstractStructuralDBElement;
use App\Entity\Contracts\TimeStampableInterface; use App\Entity\Contracts\TimeStampableInterface;
@ -32,7 +33,6 @@ use App\Entity\LogSystem\ElementEditedLogEntry;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\Mapping\ClassMetadata;
use Proxies\__CG__\App\Entity\Attachments\AttachmentType;
class TimeTravel class TimeTravel
{ {