Skip to content

Commit 83f8308

Browse files
committed
minor #1409 cleanup: use final classes (COil)
This PR was merged into the main branch. Discussion ---------- cleanup: use final classes Hello, these classes could be `final` right? (except the entities) (just done one example, will do the other if it is OK) Commits ------- 180fa15 cleanup: use final classes
2 parents 04c1798 + 180fa15 commit 83f8308

34 files changed

+34
-34
lines changed

src/Command/AddUserCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
name: 'app:add-user',
5252
description: 'Creates users and stores them in the database'
5353
)]
54-
class AddUserCommand extends Command
54+
final class AddUserCommand extends Command
5555
{
5656
private SymfonyStyle $io;
5757

src/Command/DeleteUserCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
name: 'app:delete-user',
4444
description: 'Deletes users from the database'
4545
)]
46-
class DeleteUserCommand extends Command
46+
final class DeleteUserCommand extends Command
4747
{
4848
private SymfonyStyle $io;
4949

src/Command/ListUsersCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
description: 'Lists all the existing users',
4444
aliases: ['app:users']
4545
)]
46-
class ListUsersCommand extends Command
46+
final class ListUsersCommand extends Command
4747
{
4848
public function __construct(
4949
private readonly MailerInterface $mailer,

src/Controller/Admin/BlogController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*/
4040
#[Route('/admin/post')]
4141
#[IsGranted(User::ROLE_ADMIN)]
42-
class BlogController extends AbstractController
42+
final class BlogController extends AbstractController
4343
{
4444
/**
4545
* Lists all Post entities.

src/Controller/BlogController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* @author Javier Eguiluz <[email protected]>
3737
*/
3838
#[Route('/blog')]
39-
class BlogController extends AbstractController
39+
final class BlogController extends AbstractController
4040
{
4141
/**
4242
* NOTE: For standard formats, Symfony will also automatically choose the best

src/Controller/SecurityController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* @author Ryan Weaver <[email protected]>
2828
* @author Javier Eguiluz <[email protected]>
2929
*/
30-
class SecurityController extends AbstractController
30+
final class SecurityController extends AbstractController
3131
{
3232
use TargetPathTrait;
3333

src/Controller/UserController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @author Romain Monteil <[email protected]>
3333
*/
3434
#[Route('/profile'), IsGranted(User::ROLE_USER)]
35-
class UserController extends AbstractController
35+
final class UserController extends AbstractController
3636
{
3737
#[Route('/edit', name: 'user_edit', methods: ['GET', 'POST'])]
3838
public function edit(

src/DataFixtures/AppFixtures.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use Symfony\Component\String\Slugger\SluggerInterface;
2323
use function Symfony\Component\String\u;
2424

25-
class AppFixtures extends Fixture
25+
final class AppFixtures extends Fixture
2626
{
2727
public function __construct(
2828
private readonly UserPasswordHasherInterface $passwordHasher,

src/Event/CommentCreatedEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use App\Entity\Comment;
1515
use Symfony\Contracts\EventDispatcher\Event;
1616

17-
class CommentCreatedEvent extends Event
17+
final class CommentCreatedEvent extends Event
1818
{
1919
public function __construct(
2020
protected Comment $comment

src/EventSubscriber/CheckRequirementsSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*
3030
* @author Javier Eguiluz <[email protected]>
3131
*/
32-
class CheckRequirementsSubscriber implements EventSubscriberInterface
32+
final class CheckRequirementsSubscriber implements EventSubscriberInterface
3333
{
3434
public function __construct(
3535
private readonly EntityManagerInterface $entityManager

0 commit comments

Comments
 (0)