Skip to content

Commit fcb6fda

Browse files
author
Julien Neuhart
committed
fixing PHPStan errors + PHPCodeSniffer
1 parent 81fa28a commit fcb6fda

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

app/src/Controller/ApiPostController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ public function getAllActions(): JsonResponse
6060

6161
return new JsonResponse($data, 200, [], true);
6262
}
63-
}
63+
}

app/src/Controller/ApiSecurityController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ public function logoutAction(): void
3030
{
3131
throw new \RuntimeException('This should not be reached!');
3232
}
33-
}
33+
}

app/src/Controller/IndexController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public function indexAction(): Response
2121
/** @var User $user */
2222
$user = $this->getUser();
2323
return $this->render('base.html.twig', [
24-
'isAuthenticated' => json_encode(!\is_null($user)),
25-
'roles' => json_encode(!\is_null($user) ? $user->getRoles() : []),
24+
'isAuthenticated' => json_encode(!empty($user)),
25+
'roles' => json_encode(!empty($user) ? $user->getRoles() : []),
2626
]);
2727
}
28-
}
28+
}

app/src/DataFixtures/UserFixtures.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ public function load(ObjectManager $manager): void
2121
$manager->persist($userEntity);
2222
$manager->flush();
2323
}
24-
}
24+
}

app/src/Entity/Post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,4 @@ public function getUpdated(): ?\DateTime
9696
{
9797
return $this->updated;
9898
}
99-
}
99+
}

app/src/Entity/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,4 @@ public function getUpdated(): ?\DateTime
205205
{
206206
return $this->updated;
207207
}
208-
}
208+
}

app/src/Security/AuthenticationEntryPoint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ public function start(Request $request, AuthenticationException $authException =
3333
{
3434
return new JsonResponse([], Response::HTTP_FORBIDDEN);
3535
}
36-
}
36+
}

app/src/Security/HashPasswordListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ private function encodePassword(User $entity): void
7878

7979
$entity->setPassword($encoded);
8080
}
81-
}
81+
}

app/src/Service/PostService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ public function getAll(): array
4040
{
4141
return $this->em->getRepository(Post::class)->findBy([], ['id' => 'DESC']);
4242
}
43-
}
43+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy