mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 01:49:05 +02:00
Fixed PHPStan errors.
This commit is contained in:
parent
f604022e49
commit
15d25cf2b2
4 changed files with 5 additions and 4 deletions
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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', [
|
||||||
|
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue