Skip to content

Commit 181771d

Browse files
Make classes final if possible
Also, redefine the hierarchy a bit to allow for the rule: Either a class is final, or it is abstract.
1 parent 86e8d5e commit 181771d

32 files changed

+46
-38
lines changed

src/Bridge/FormFactory/ConsoleFormWithDefaultValuesAndOptionsFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Symfony\Component\Form\FormRegistryInterface;
1111
use Symfony\Component\Form\Test\FormBuilderInterface;
1212

13-
class ConsoleFormWithDefaultValuesAndOptionsFactory implements ConsoleFormFactory
13+
final class ConsoleFormWithDefaultValuesAndOptionsFactory implements ConsoleFormFactory
1414
{
1515
/**
1616
* @var FormFactoryInterface

src/Bridge/Interaction/CollectionInteractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
1616
use Symfony\Component\Form\FormInterface;
1717

18-
class CollectionInteractor implements FormInteractor
18+
final class CollectionInteractor implements FormInteractor
1919
{
2020
/**
2121
* @var FormInteractor

src/Bridge/Interaction/CompoundInteractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Symfony\Component\Console\Output\OutputInterface;
1111
use Symfony\Component\Form\FormInterface;
1212

13-
class CompoundInteractor implements FormInteractor
13+
final class CompoundInteractor implements FormInteractor
1414
{
1515
/**
1616
* @var FormInteractor

src/Bridge/Interaction/DelegatingInteractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Symfony\Component\Console\Output\OutputInterface;
99
use Symfony\Component\Form\FormInterface;
1010

11-
class DelegatingInteractor implements FormInteractor
11+
final class DelegatingInteractor implements FormInteractor
1212
{
1313
/**
1414
* @var FormInteractor[]

src/Bridge/Interaction/Exception/CanNotInteractWithForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
use LogicException;
66

7-
class CanNotInteractWithForm extends LogicException
7+
final class CanNotInteractWithForm extends LogicException
88
{
99
}

src/Bridge/Interaction/Exception/FormNotReadyForInteraction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
use LogicException;
66

7-
class FormNotReadyForInteraction extends LogicException
7+
final class FormNotReadyForInteraction extends LogicException
88
{
99
}

src/Bridge/Interaction/Exception/NoNeedToInteractWithForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
use LogicException;
66

7-
class NoNeedToInteractWithForm extends LogicException
7+
final class NoNeedToInteractWithForm extends LogicException
88
{
99
}

src/Bridge/Interaction/FieldInteractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Symfony\Component\Console\Output\OutputInterface;
1212
use Symfony\Component\Form\FormInterface;
1313

14-
class FieldInteractor implements FormInteractor
14+
final class FieldInteractor implements FormInteractor
1515
{
1616
/**
1717
* @var TransformerResolver

src/Bridge/Interaction/FieldWithNoInteractionInteractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
1212
use Symfony\Component\Form\FormInterface;
1313

14-
class FieldWithNoInteractionInteractor implements FormInteractor
14+
final class FieldWithNoInteractionInteractor implements FormInteractor
1515
{
1616
/**
1717
* @throws NoNeedToInteractWithForm

src/Bridge/Interaction/NonInteractiveRootInteractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
1010
use Symfony\Component\Form\FormInterface;
1111

12-
class NonInteractiveRootInteractor implements FormInteractor
12+
final class NonInteractiveRootInteractor implements FormInteractor
1313
{
1414
/**
1515
* @throws CanNotInteractWithForm If isn't a root form or is the input is interactive

0 commit comments

Comments
 (0)