Skip to content

Commit 06cf16c

Browse files
committed
fix: run lint
1 parent 2fe5702 commit 06cf16c

18 files changed

+60
-51
lines changed

src/DependencyInjection/Configuration.php

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,27 @@ public function getConfigTreeBuilder()
2727
$rootNode
2828
->useAttributeAsKey('name')
2929
->prototype('array')
30-
->useAttributeAsKey('field')
31-
->prototype('array')
32-
->children()
33-
->booleanNode('enabled')
34-
->defaultTrue()
35-
->end()
36-
37-
->scalarNode('type')
38-
->isRequired()
39-
->end()
40-
41-
->variableNode('options')
42-
->end()
43-
44-
->variableNode('transformer')
45-
->end()
46-
47-
->variableNode('validation')
48-
->end()
49-
50-
->scalarNode('data_provider')
51-
->end()
52-
53-
->scalarNode('help_message_provider')
54-
->end()
55-
->end()
56-
->end()
30+
->useAttributeAsKey('field')
31+
->prototype('array')
32+
->children()
33+
->booleanNode('enabled')
34+
->defaultTrue()
35+
->end()
36+
->scalarNode('type')
37+
->isRequired()
38+
->end()
39+
->variableNode('options')
40+
->end()
41+
->variableNode('transformer')
42+
->end()
43+
->variableNode('validation')
44+
->end()
45+
->scalarNode('data_provider')
46+
->end()
47+
->scalarNode('help_message_provider')
48+
->end()
49+
->end()
50+
->end()
5751
->end();
5852

5953
return $treeBuilder;

src/Form/FormFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function addEventSubscriber($formName, EventSubscriberInterface $eventSub
8282

8383
/**
8484
* @param string $key The key of the Form in the form configuration
85-
* @param mixed $data
85+
* @param array $data
8686
* @param array $options
8787
* @param string $name An name for the form. If empty, the key will be used
8888
*
@@ -242,7 +242,7 @@ public function loadHelpMessageProvider($alias)
242242
*/
243243
public function getConfiguration($name = null)
244244
{
245-
if (null === $name) {
245+
if ($name === null) {
246246
return $this->configuration;
247247
}
248248

tests/Form/FormFactoryTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
use Linio\DynamicFormBundle\Exception\NonExistentFormException;
88
use Linio\DynamicFormBundle\Form\FormFactory;
99
use Linio\DynamicFormBundle\HelpMessageProvider;
10+
use PHPUnit\Framework\TestCase;
1011
use Prophecy\Prophecy\ObjectProphecy;
1112
use Symfony\Component\Form\DataTransformerInterface;
1213
use Symfony\Component\Form\Extension\Core\Type\FormType;
1314
use Symfony\Component\Form\FormBuilder;
1415
use Symfony\Component\Form\FormFactory as SymfonyFormFactory;
1516
use Symfony\Component\Validator\Constraints\IsTrue;
1617

17-
class FormFactoryTest extends \PHPUnit_Framework_TestCase
18+
class FormFactoryTest extends TestCase
1819
{
1920
/**
2021
* @var ObjectProphecy
@@ -31,11 +32,10 @@ class FormFactoryTest extends \PHPUnit_Framework_TestCase
3132
*/
3233
protected $formFactoryMock;
3334

34-
/**
35-
* @expectedException \Linio\DynamicFormBundle\Exception\NonExistentFormException
36-
*/
3735
public function testIsThrowingExceptionWhenCreatingAnInexistentForm(): void
3836
{
37+
$this->expectException(NonExistentFormException::class);
38+
3939
$this->formFactory->setConfiguration(['foo' => []]);
4040
$this->formFactory->createForm('bar');
4141
}

tests/FormlyMapper/FormlyField/ChoiceFieldTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
namespace Linio\DynamicFormBundle\Tests\FormlyMapper\FormlyField;
66

77
use Linio\DynamicFormBundle\FormlyMapper\FormlyField\ChoiceField;
8+
use PHPUnit\Framework\TestCase;
89

9-
class ChoiceFieldTest extends \PHPUnit_Framework_TestCase
10+
class ChoiceFieldTest extends TestCase
1011
{
1112
/**
1213
* @var ChoiceField

tests/FormlyMapper/FormlyField/DateFieldTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
namespace Linio\DynamicFormBundle\Tests\FormlyMapper\FormlyField;
66

77
use Linio\DynamicFormBundle\FormlyMapper\FormlyField\DateField;
8+
use PHPUnit\Framework\TestCase;
89

9-
class DateFieldTest extends \PHPUnit_Framework_TestCase
10+
class DateFieldTest extends TestCase
1011
{
1112
/**
1213
* @var DateField

tests/FormlyMapper/FormlyField/EmailFieldTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
namespace Linio\DynamicFormBundle\Tests\FormlyMapper\FormlyField;
66

77
use Linio\DynamicFormBundle\FormlyMapper\FormlyField\EmailField;
8+
use PHPUnit\Framework\TestCase;
89

9-
class EmailFieldTest extends \PHPUnit_Framework_TestCase
10+
class EmailFieldTest extends TestCase
1011
{
1112
/**
1213
* @var EmailField

tests/FormlyMapper/FormlyField/EntityFieldTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
namespace Linio\DynamicFormBundle\Tests\FormlyMapper\FormlyField;
66

77
use Linio\DynamicFormBundle\FormlyMapper\FormlyField\EntityField;
8+
use PHPUnit\Framework\TestCase;
89

9-
class EntityFieldTest extends \PHPUnit_Framework_TestCase
10+
class EntityFieldTest extends TestCase
1011
{
1112
/**
1213
* @var EntityField

tests/FormlyMapper/FormlyField/FileFieldTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
namespace Linio\DynamicFormBundle\Tests\FormlyMapper\FormlyField;
66

77
use Linio\DynamicFormBundle\FormlyMapper\FormlyField\FileField;
8+
use PHPUnit\Framework\TestCase;
89

9-
class FileFieldTest extends \PHPUnit_Framework_TestCase
10+
class FileFieldTest extends TestCase
1011
{
1112
/**
1213
* @var FileField

tests/FormlyMapper/FormlyField/FormlyFieldFactoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
use Linio\DynamicFormBundle\FormlyMapper\FormlyField\DefaultField;
88
use Linio\DynamicFormBundle\FormlyMapper\FormlyField\FormlyFieldFactory;
99
use Linio\DynamicFormBundle\FormlyMapper\FormlyField\NumberField;
10+
use PHPUnit\Framework\TestCase;
1011

11-
class FormlyFieldFactoryTest extends \PHPUnit_Framework_TestCase
12+
class FormlyFieldFactoryTest extends TestCase
1213
{
1314
public function testIsHasTheFormlyField(): void
1415
{

tests/FormlyMapper/FormlyField/HiddenFieldTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
namespace Linio\DynamicFormBundle\Tests\FormlyMapper\FormlyField;
66

77
use Linio\DynamicFormBundle\FormlyMapper\FormlyField\HiddenField;
8+
use PHPUnit\Framework\TestCase;
89

9-
class HiddenFieldTest extends \PHPUnit_Framework_TestCase
10+
class HiddenFieldTest extends TestCase
1011
{
1112
/**
1213
* @var HiddenField

0 commit comments

Comments
 (0)