Your project must not contain invalid function or method calls 5
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_call
- $this->entityManager->flush();
- $this->bus->dispatch(new SendContactEmail(
- $data->getName(),
- $data->getEmail(),
- $data->getMessage(),
- $data->getId(),
- ));
- return $data;
- }
- $this->bus->dispatch(new SendContactEmail(
- $data->getName(),
- $data->getEmail(),
- $data->getMessage(),
- $data->getId(),
- ));
- return $data;
- }
- }
- {
- $this->entityManager->persist($data);
- $this->entityManager->flush();
- $this->bus->dispatch(new SendContactEmail(
- $data->getName(),
- $data->getEmail(),
- $data->getMessage(),
- $data->getId(),
- ));
- private readonly MessageBusInterface $bus,
- ) {}
- public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): Contact
- {
- $this->entityManager->persist($data);
- $this->entityManager->flush();
- $this->bus->dispatch(new SendContactEmail(
- $data->getName(),
- $data->getEmail(),
- $this->entityManager->persist($data);
- $this->entityManager->flush();
- $this->bus->dispatch(new SendContactEmail(
- $data->getName(),
- $data->getEmail(),
- $data->getMessage(),
- $data->getId(),
- ));
- return $data;
Your project must not contain invalid instantiations 4
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_instantiation
- $this->entityManager->persist($data);
- $this->entityManager->flush();
- $this->bus->dispatch(new SendContactEmail(
- $data->getName(),
- $data->getEmail(),
- $data->getMessage(),
- $data->getId(),
- ));
- return $data;
- $this->entityManager->flush();
- $this->bus->dispatch(new SendContactEmail(
- $data->getName(),
- $data->getEmail(),
- $data->getMessage(),
- $data->getId(),
- ));
- return $data;
- }
- {
- $this->entityManager->persist($data);
- $this->entityManager->flush();
- $this->bus->dispatch(new SendContactEmail(
- $data->getName(),
- $data->getEmail(),
- $data->getMessage(),
- $data->getId(),
- ));
- $this->bus->dispatch(new SendContactEmail(
- $data->getName(),
- $data->getEmail(),
- $data->getMessage(),
- $data->getId(),
- ));
- return $data;
- }
- }
Your project should not use invalid return types 5
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_return_typehint
- $data->getEmail(),
- $data->getMessage(),
- $data->getId(),
- ));
- return $data;
- }
- }
- public function getRoles(): array
- {
- $roles = $this->roles;
- $roles[] = 'ROLE_USER';
- return array_unique($roles);
- }
- public function setRoles(array $roles): static
- {
- $this->roles = $roles;
- return $this;
- }
- public function getUserIdentifier(): string
- {
- return (string) $this->username;
- }
- public function eraseCredentials(): void {}
- }
- parent::__construct($registry, Project::class);
- }
- public function findAllWithTechnologies(): array
- {
- return $this->createQueryBuilder('p')
- ->addSelect('t', 'i')
- ->leftJoin('p.technologies', 't')
- ->leftJoin('p.image', 'i')
- ->orderBy('p.id', 'DESC')
- ->getQuery()
- parent::__construct($registry, Experience::class);
- }
- public function findAllWithTasks(): array
- {
- return $this->createQueryBuilder('e')
- ->addSelect('t')
- ->leftJoin('e.tasks', 't')
- ->orderBy('e.startedAt', 'DESC')
- ->getQuery()
- ->getResult();
Your project should not use invalid parameter and return typehints
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_typehint
- $roles = $this->roles;
- $roles[] = 'ROLE_USER';
- return array_unique($roles);
- }
- public function setRoles(array $roles): static
- {
- $this->roles = $roles;
- return $this;
- }
Your project should use return types 2
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.missing_return_typehint
- public function __construct(ManagerRegistry $registry)
- {
- parent::__construct($registry, Project::class);
- }
- public function findAllWithTechnologies(): array
- {
- return $this->createQueryBuilder('p')
- ->addSelect('t', 'i')
- ->leftJoin('p.technologies', 't')
- ->leftJoin('p.image', 'i')
- public function __construct(ManagerRegistry $registry)
- {
- parent::__construct($registry, Experience::class);
- }
- public function findAllWithTasks(): array
- {
- return $this->createQueryBuilder('e')
- ->addSelect('t')
- ->leftJoin('e.tasks', 't')
- ->orderBy('e.startedAt', 'DESC')
Your project should contain a robots.txt file
- Read doc
- Reputation
- Major
More information: https://insight.symfony.com/what-we-analyse/web.missing_robots_txt
-
public
- images
- index.php
Your project session configuration could expose your users data
- Read doc
- Legal
- Data leak
- Major
More information: https://insight.symfony.com/what-we-analyse/symfony.request.session_cookie_default_name
Web applications should contain a site.webmanifest file
- Read doc
- Reputation
- Minor
More information: https://insight.symfony.com/what-we-analyse/web.missing_web_manifest
-
public
- images
- index.php
Text files should end with a valid new line character. 37
- Read doc
- Productivity
- Info
More information: https://insight.symfony.com/what-we-analyse/missing_e_o_l
- $data->getId(),
- ));
- return $data;
- }
- }
- public function setStatus(string $status): static
- {
- $this->status = $status;
- return $this;
- }
- }
- {
- return (string) $this->username;
- }
- public function eraseCredentials(): void {}
- }
- controllers:
- resource: routing.controllers
- api_login:
- path: /api/login
- methods: [POST]
- ->leftJoin('p.image', 'i')
- ->orderBy('p.id', 'DESC')
- ->getQuery()
- ->getResult();
- }
- }
- ->leftJoin('e.tasks', 't')
- ->orderBy('e.startedAt', 'DESC')
- ->getQuery()
- ->getResult();
- }
- }
- $task->setExperience(null);
- }
- }
- return $this;
- }
- }
- paths:
- '^/api/':
- allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
- allow_headers: ['Content-Type', 'Authorization']
- allow_methods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS']
- max_age: 3600
- $this->filename = $filename;
- return $this;
- }
- public function getUploadedAt(): DateTimeImmutable { return $this->uploadedAt; }
- }
- failed:
- dsn: 'doctrine://default?queue_name=failed'
- routing:
- App\Message\SendContactEmail: async
- null,
- ['groups' => ['technology:read']]
- ),
- ]);
- }
- }
- public function setImage(Image $image): static
- {
- $this->image = $image;
- return $this;
- }
- }
- public function removeTechnology(Technology $technology): static
- {
- $this->technologies->removeElement($technology);
- return $this;
- }
- }