mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
ci: add phpstan
This commit is contained in:
@@ -52,7 +52,9 @@ class ConnectorController extends AbstractController
|
||||
public function createConnector(Request $request): Connector
|
||||
{
|
||||
$connector = $this->serializer->deserialize($request->getContent(), Connector::class, 'json', ['groups' => 'connector:create']);
|
||||
$connector->setUser($this->getUser());
|
||||
/** @var User $user */
|
||||
$user = $this->getUser();
|
||||
$connector->setUser($user);
|
||||
|
||||
if (ConnectorProvider::OVH === $connector->getProvider()) {
|
||||
$authData = OvhConnector::verifyAuthData($connector->getAuthData());
|
||||
|
||||
@@ -54,7 +54,7 @@ class DomainRefreshController extends AbstractController
|
||||
}
|
||||
}
|
||||
|
||||
$updatedAt = null === $domain ? new \DateTimeImmutable('now') : $domain->getUpdatedAt();
|
||||
$updatedAt = null === $domain->getUpdatedAt() ? new \DateTimeImmutable('now') : $domain->getUpdatedAt();
|
||||
$domain = $this->RDAPService->registerDomain($ldhName);
|
||||
|
||||
/** @var WatchList $watchList */
|
||||
|
||||
@@ -25,7 +25,7 @@ class HomeController extends AbstractController
|
||||
#[Route(path: '/login/oauth', name: 'oauth_connect')]
|
||||
public function connectAction(ClientRegistry $clientRegistry): Response
|
||||
{
|
||||
return $clientRegistry->getClient('oauth')->redirect();
|
||||
return $clientRegistry->getClient('oauth')->redirect([], []);
|
||||
}
|
||||
|
||||
#[Route(path: '/logout', name: 'logout')]
|
||||
|
||||
@@ -51,7 +51,9 @@ class WatchListController extends AbstractController
|
||||
public function createWatchList(Request $request): WatchList
|
||||
{
|
||||
$watchList = $this->serializer->deserialize($request->getContent(), WatchList::class, 'json', ['groups' => 'watchlist:create']);
|
||||
$watchList->setUser($this->getUser());
|
||||
/** @var User $user */
|
||||
$user = $this->getUser();
|
||||
$watchList->setUser($user);
|
||||
|
||||
$this->em->persist($watchList);
|
||||
$this->em->flush();
|
||||
@@ -86,12 +88,13 @@ class WatchListController extends AbstractController
|
||||
/** @var DomainEntity $entity */
|
||||
foreach ($domain->getDomainEntities()->toArray() as $entity) {
|
||||
$vCard = Reader::readJson($entity->getEntity()->getJCard());
|
||||
$email = (string) $vCard->EMAIL;
|
||||
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
continue;
|
||||
if (isset($vCard->EMAIL) && isset($vCard->FN)) {
|
||||
$email = (string) $vCard->EMAIL;
|
||||
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
continue;
|
||||
}
|
||||
$attendees[] = (new Attendee(new EmailAddress($email)))->setDisplayName((string) $vCard->FN);
|
||||
}
|
||||
|
||||
$attendees[] = (new Attendee(new EmailAddress($email)))->setDisplayName((string) $vCard->FN);
|
||||
}
|
||||
|
||||
/** @var DomainEvent $event */
|
||||
|
||||
Reference in New Issue
Block a user