Skip to content

Commit

Permalink
chore: backend lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mp3000mp committed Apr 30, 2024
1 parent 5a637bf commit d2b4849
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: frontend
on:
push:
branches: [ "master" ]
branches: [ "main" ]
pull_request:
branches: [ "master" ]
branches: [ "main" ]

jobs:
lint-and-tests:
Expand Down
2 changes: 1 addition & 1 deletion backend/src/Security/Authenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(private SerializerInterface $serializer, private Rat
{
}

public function start(Request $request, AuthenticationException $authException = null): Response
public function start(Request $request, ?AuthenticationException $authException = null): Response
{
return new JsonResponse([
'message' => 'Access denied.',
Expand Down
2 changes: 1 addition & 1 deletion backend/src/Service/Request/JsonRequestHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(ParameterBagInterface $parameterBag, private Seriali
*
* @return T|mixed
*/
public function handleRequest(string $rawData, string $schema, string $class = null, $entity = null)
public function handleRequest(string $rawData, string $schema, ?string $class = null, $entity = null)
{
// json schema
$jsonData = json_decode($rawData);
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/Controller/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected function assertResponseCode(int $expectedCode, bool $doNotDump = false
self::assertEquals($expectedCode, $responseCode);
}

protected function loginUser(KernelBrowser $client = null, string $role = 'ROLE_USER'): void
protected function loginUser(?KernelBrowser $client = null, string $role = 'ROLE_USER'): void
{
$userRepository = $this->em->getRepository(User::class);
$testUser = $userRepository->findOneBy(['username' => $this->userByRole[$role]]);
Expand Down

0 comments on commit d2b4849

Please sign in to comment.