From c3b413760126ae627046754ee9e1517edb54dd47 Mon Sep 17 00:00:00 2001 From: Warnar Boekkooi Date: Thu, 8 Jan 2015 18:01:58 +0100 Subject: [PATCH] Code style fixes --- src/DependencyInjection/Configuration.php | 2 +- src/Form/Extension/FormTypeExtension.php | 6 ++-- .../Processor/ViewTransformerProcessor.php | 1 + .../config/form_rule_additional_mappers.yml | 2 +- src/Twig/JqueryValidationExtension.php | 9 +++--- tests/Functional/BasicFormTest.php | 2 +- tests/Functional/FormTestCase.php | 11 ++++--- .../TestBundle/Controller/FormController.php | 4 +-- .../Form/Type/AdditionalRulesFormType.php | 32 +++++++++---------- .../TestBundle/Form/Type/ButtonsFormType.php | 12 +++---- .../Form/Type/CollectionCompoundFormType.php | 4 +-- .../Form/Type/CollectionDateTimeFormType.php | 10 +++--- .../Form/Type/CollectionFormType.php | 14 ++++---- .../Type/CollectionWithGroupsFormType.php | 18 +++++------ .../TestBundle/Form/Type/DateTimeFormType.php | 16 +++++----- .../Form/Type/IncludeSimpleFormType.php | 4 +-- .../TestBundle/Form/Type/RootDataFormType.php | 2 +- .../Form/Type/SimpleDataFormType.php | 2 +- .../TestBundle/Form/Type/SimpleFormType.php | 6 ++-- .../Form/Type/ViewTransformRulesFormType.php | 6 ++-- tests/Functional/TotalFormTest.php | 2 +- tests/Functional/app/AppKernel.php | 7 ++-- tests/Functional/app/config/config.yml | 2 +- tests/Functional/app/config/config_test.yml | 2 +- tests/Functional/app/config/routing.yml | 2 +- tests/Functional/web/index.php | 4 +-- tests/Unit/Form/FormRuleCompilerTest.php | 5 ++- tests/Unit/Form/FormRuleProcessorTest.php | 4 +-- tests/Unit/Form/RuleCollectionTest.php | 4 +-- tests/Unit/Form/Util/FormHelperTest.php | 7 ++-- .../Validator/ConstraintCollectionTest.php | 2 +- tests/bootstrap.php | 2 +- 32 files changed, 103 insertions(+), 103 deletions(-) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index c9e7f68..c96e4b7 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -47,7 +47,7 @@ private function loadFormNode() 'pattern' => true, 'time' => true, 'one_or_other' => true, - 'required_group' => true + 'required_group' => true, )) ->treatFalseLike(array()) ->addDefaultsIfNotSet() diff --git a/src/Form/Extension/FormTypeExtension.php b/src/Form/Extension/FormTypeExtension.php index d3cff20..b415934 100644 --- a/src/Form/Extension/FormTypeExtension.php +++ b/src/Form/Extension/FormTypeExtension.php @@ -111,7 +111,7 @@ public function finishView(FormView $view, FormInterface $form, array $options) // Store child builders to be later compiled $rootView->vars['rule_builder_children'][] = array( 'view' => $view, - 'builder' => $view->vars['rule_builder'] + 'builder' => $view->vars['rule_builder'], ); unset($view->vars['rule_builder']); } @@ -119,10 +119,10 @@ public function finishView(FormView $view, FormInterface $form, array $options) public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(array( - 'jquery_validation' => $this->defaultEnabled + 'jquery_validation' => $this->defaultEnabled, )); $resolver->setAllowedTypes(array( - 'jquery_validation' => array('bool', 'null') + 'jquery_validation' => array('bool', 'null'), )); } diff --git a/src/Form/Rule/Processor/ViewTransformerProcessor.php b/src/Form/Rule/Processor/ViewTransformerProcessor.php index f34d9cf..0042e3c 100644 --- a/src/Form/Rule/Processor/ViewTransformerProcessor.php +++ b/src/Form/Rule/Processor/ViewTransformerProcessor.php @@ -27,6 +27,7 @@ protected function getFormRuleMessage(FormConfigInterface $config) // Get correct error message if one is set. if ($config->hasOption('invalid_message')) { $params = $config->getOption('invalid_message_parameters'); + return new RuleMessage( $config->getOption('invalid_message'), is_array($params) ? $params : array() diff --git a/src/Resources/config/form_rule_additional_mappers.yml b/src/Resources/config/form_rule_additional_mappers.yml index 64265a7..3d47d87 100644 --- a/src/Resources/config/form_rule_additional_mappers.yml +++ b/src/Resources/config/form_rule_additional_mappers.yml @@ -28,4 +28,4 @@ services: arguments: [ %boekkooi.jquery_validation.additional.accept% ] public: false tags: - - { name: form_rule_constraint_mapper } \ No newline at end of file + - { name: form_rule_constraint_mapper } diff --git a/src/Twig/JqueryValidationExtension.php b/src/Twig/JqueryValidationExtension.php index 68a7556..6b97619 100644 --- a/src/Twig/JqueryValidationExtension.php +++ b/src/Twig/JqueryValidationExtension.php @@ -22,7 +22,7 @@ public function getFunctions() 'form_jquery_validation', array($this, 'renderJavascript'), array('needs_environment' => true, 'pre_escape' => array('html', 'js'), 'is_safe' => array('html', 'js')) - ) + ), ); } @@ -69,7 +69,7 @@ public function renderJavascript(\Twig_Environment $twig, FormView $view) $js = $twig->render($template, $templateVars); - return preg_replace('/\s+/', ' ' , $js); + return preg_replace('/\s+/', ' ', $js); } protected function validationGroupsViewData(FormRuleContext $context) @@ -98,21 +98,20 @@ protected function buttonsViewData(FormRuleContext $context) $buttons[] = array( 'name' => $name, 'cancel' => count($groups) === 0, - 'validation_groups' => $groups + 'validation_groups' => $groups, ); } return $buttons; } - protected function fieldRulesViewData(FormRuleContext $context) { $fields = array(); foreach ($context->all() as $name => $rules) { $fields[] = array( 'name' => $name, - 'rules' => $rules + 'rules' => $rules, ); } diff --git a/tests/Functional/BasicFormTest.php b/tests/Functional/BasicFormTest.php index 6de869c..f1711ee 100644 --- a/tests/Functional/BasicFormTest.php +++ b/tests/Functional/BasicFormTest.php @@ -11,7 +11,7 @@ class BasicFormTest extends FormTestCase protected static function getSymfonyOptions() { return array( - 'enable_additionals' => false + 'enable_additionals' => false, ); } diff --git a/tests/Functional/FormTestCase.php b/tests/Functional/FormTestCase.php index 7681de0..5e8122c 100644 --- a/tests/Functional/FormTestCase.php +++ b/tests/Functional/FormTestCase.php @@ -15,7 +15,7 @@ public static function setUpBeforeClass() parent::setUpBeforeClass(); foreach (static::getSymfonyOptions() as $option => $value) { - $_SERVER['SYMFONY__' . $option] = $value; + $_SERVER['SYMFONY__'.$option] = $value; } } @@ -30,7 +30,8 @@ public static function tearDownAfterClass() static::$kernel = null; } - protected static function getSymfonyOptions() { + protected static function getSymfonyOptions() + { return array(); } @@ -63,7 +64,7 @@ protected function stripWhiteSpace($js) array(', ', ' { ', ' } ', ' : ', '; ', ' function '), trim($js) ); - return preg_replace('/(\s+|\n)/', ' ' , trim($js)); - } -} \ No newline at end of file + return preg_replace('/(\s+|\n)/', ' ', trim($js)); + } +} diff --git a/tests/Functional/TestBundle/Controller/FormController.php b/tests/Functional/TestBundle/Controller/FormController.php index ba86f68..65aac52 100644 --- a/tests/Functional/TestBundle/Controller/FormController.php +++ b/tests/Functional/TestBundle/Controller/FormController.php @@ -122,9 +122,9 @@ private function handleForm(Request $request, FormInterface $form) { $form->handleRequest($request); if ($form->isValid()) { - $this->addNotice(date('H:i:s') . ': Valid'); + $this->addNotice(date('H:i:s').': Valid'); } elseif ($request->isMethod('POST')) { - $this->addNotice( date('H:i:s') . ': Invalid'); + $this->addNotice(date('H:i:s').': Invalid'); } } diff --git a/tests/Functional/TestBundle/Form/Type/AdditionalRulesFormType.php b/tests/Functional/TestBundle/Form/Type/AdditionalRulesFormType.php index d3e26a4..447785c 100644 --- a/tests/Functional/TestBundle/Form/Type/AdditionalRulesFormType.php +++ b/tests/Functional/TestBundle/Form/Type/AdditionalRulesFormType.php @@ -16,43 +16,43 @@ public function buildForm(FormBuilderInterface $builder, array $options) ->add('ipv4', null, array( 'constraints' => array( new Constraints\Ip(array( - 'version' => Constraints\Ip::V4 - )) - ) + 'version' => Constraints\Ip::V4, + )), + ), )) ->add('ipv6', null, array( 'constraints' => array( new Constraints\Ip(array( - 'version' => Constraints\Ip::V6 - )) - ) + 'version' => Constraints\Ip::V6, + )), + ), )) ->add('ipv4_ipv6', null, array( 'constraints' => array( new Constraints\Ip(array( - 'version' => Constraints\Ip::ALL - )) - ) + 'version' => Constraints\Ip::ALL, + )), + ), )) ->add('iban', null, array( 'constraints' => array( - new Constraints\Iban() - ) + new Constraints\Iban(), + ), )) ->add('luhn', null, array( 'constraints' => array( - new Constraints\Luhn() - ) + new Constraints\Luhn(), + ), )) ->add('file', 'file', array( 'constraints' => array( new Constraints\File(array( - 'mimeTypes' => array('text/plain', 'application/pdf') - )) - ) + 'mimeTypes' => array('text/plain', 'application/pdf'), + )), + ), )) ; } diff --git a/tests/Functional/TestBundle/Form/Type/ButtonsFormType.php b/tests/Functional/TestBundle/Form/Type/ButtonsFormType.php index a9ef92b..c43d123 100644 --- a/tests/Functional/TestBundle/Form/Type/ButtonsFormType.php +++ b/tests/Functional/TestBundle/Form/Type/ButtonsFormType.php @@ -19,9 +19,9 @@ public function buildForm(FormBuilderInterface $builder, array $options) new Constraints\Length(array( 'min' => 8, 'max' => 200, - 'groups' => 'main' - )) - ) + 'groups' => 'main', + )), + ), )) ->add('content', 'textarea', array( 'constraints' => array( @@ -29,9 +29,9 @@ public function buildForm(FormBuilderInterface $builder, array $options) new Constraints\Length(array( 'min' => 8, 'max' => 200, - 'groups' => 'never_used' - )) - ) + 'groups' => 'never_used', + )), + ), )) ->add('defaultValidation', 'submit') ->add('mainValidation', 'submit', array( diff --git a/tests/Functional/TestBundle/Form/Type/CollectionCompoundFormType.php b/tests/Functional/TestBundle/Form/Type/CollectionCompoundFormType.php index 0f2da0c..a4d14e6 100644 --- a/tests/Functional/TestBundle/Form/Type/CollectionCompoundFormType.php +++ b/tests/Functional/TestBundle/Form/Type/CollectionCompoundFormType.php @@ -19,8 +19,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) new Constraints\Length(array( 'min' => 8, 'max' => 200, - )) - ) + )), + ), )) ->add('tags', 'collection', array( 'type' => new SimpleFormType(), diff --git a/tests/Functional/TestBundle/Form/Type/CollectionDateTimeFormType.php b/tests/Functional/TestBundle/Form/Type/CollectionDateTimeFormType.php index 63deae9..2c169f6 100644 --- a/tests/Functional/TestBundle/Form/Type/CollectionDateTimeFormType.php +++ b/tests/Functional/TestBundle/Form/Type/CollectionDateTimeFormType.php @@ -18,8 +18,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'constraints' => array( new Constraints\Count(array( 'min' => 1, - 'max' => 5 - )) + 'max' => 5, + )), ), 'allow_add' => true, @@ -29,9 +29,9 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'options' => array( 'widget' => 'text', 'constraints' => array( - new Constraints\NotBlank() - ) - ) + new Constraints\NotBlank(), + ), + ), )) ->add('defaultValidation', 'submit') ->add('mainValidation', 'submit', array( diff --git a/tests/Functional/TestBundle/Form/Type/CollectionFormType.php b/tests/Functional/TestBundle/Form/Type/CollectionFormType.php index 0269470..8b4b9cb 100644 --- a/tests/Functional/TestBundle/Form/Type/CollectionFormType.php +++ b/tests/Functional/TestBundle/Form/Type/CollectionFormType.php @@ -19,16 +19,16 @@ public function buildForm(FormBuilderInterface $builder, array $options) new Constraints\Length(array( 'min' => 8, 'max' => 200, - )) - ) + )), + ), )) ->add('tags', 'collection', array( 'type' => 'text', 'constraints' => array( new Constraints\Count(array( 'min' => 1, - 'max' => 5 - )) + 'max' => 5, + )), ), 'allow_add' => true, @@ -38,9 +38,9 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'prototype_name' => 'tag__name__', 'options' => array( 'constraints' => array( - new Constraints\NotBlank() - ) - ) + new Constraints\NotBlank(), + ), + ), )) ; } diff --git a/tests/Functional/TestBundle/Form/Type/CollectionWithGroupsFormType.php b/tests/Functional/TestBundle/Form/Type/CollectionWithGroupsFormType.php index 4edf724..912918e 100644 --- a/tests/Functional/TestBundle/Form/Type/CollectionWithGroupsFormType.php +++ b/tests/Functional/TestBundle/Form/Type/CollectionWithGroupsFormType.php @@ -19,17 +19,17 @@ public function buildForm(FormBuilderInterface $builder, array $options) new Constraints\Length(array( 'min' => 8, 'max' => 200, - 'groups' => 'main' - )) - ) + 'groups' => 'main', + )), + ), )) ->add('tags', 'collection', array( 'type' => 'text', 'constraints' => array( new Constraints\Count(array( 'min' => 1, - 'max' => 5 - )) + 'max' => 5, + )), ), 'allow_add' => true, @@ -43,10 +43,10 @@ public function buildForm(FormBuilderInterface $builder, array $options) new Constraints\Length(array( 'min' => 8, 'max' => 200, - 'groups' => 'main' - )) - ) - ) + 'groups' => 'main', + )), + ), + ), )) ->add('defaultValidation', 'submit') ->add('mainValidation', 'submit', array( diff --git a/tests/Functional/TestBundle/Form/Type/DateTimeFormType.php b/tests/Functional/TestBundle/Form/Type/DateTimeFormType.php index a8dcba0..7bdc612 100644 --- a/tests/Functional/TestBundle/Form/Type/DateTimeFormType.php +++ b/tests/Functional/TestBundle/Form/Type/DateTimeFormType.php @@ -17,29 +17,29 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'label' => 'DateTime choice', 'required' => false, 'constraints' => array( - new Constraints\NotBlank() - ) + new Constraints\NotBlank(), + ), )) ->add('date_choice', 'date', array( 'label' => 'Date choice', 'required' => false, 'constraints' => array( - new Constraints\NotBlank() + new Constraints\NotBlank(), ), )) ->add('date_text', 'date', array( 'widget' => 'text', 'label' => 'Date text', 'constraints' => array( - new Constraints\NotBlank() + new Constraints\NotBlank(), ), )) ->add('date_single_text', 'date', array( 'widget' => 'single_text', 'label' => 'Date single text', 'constraints' => array( - new Constraints\NotBlank() + new Constraints\NotBlank(), ), )) @@ -48,21 +48,21 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'label' => 'Time choice', 'required' => false, 'constraints' => array( - new Constraints\NotBlank() + new Constraints\NotBlank(), ), )) ->add('time_text', 'time', array( 'widget' => 'text', 'label' => 'Time text', 'constraints' => array( - new Constraints\NotBlank() + new Constraints\NotBlank(), ), )) ->add('time_single_text', 'time', array( 'widget' => 'single_text', 'label' => 'Time single text', 'constraints' => array( - new Constraints\NotBlank() + new Constraints\NotBlank(), ), )) ; diff --git a/tests/Functional/TestBundle/Form/Type/IncludeSimpleFormType.php b/tests/Functional/TestBundle/Form/Type/IncludeSimpleFormType.php index 789fd84..7b6c911 100644 --- a/tests/Functional/TestBundle/Form/Type/IncludeSimpleFormType.php +++ b/tests/Functional/TestBundle/Form/Type/IncludeSimpleFormType.php @@ -21,9 +21,9 @@ public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(array( 'validation_groups' => array( - 'Default', 'userBasicEntity' + 'Default', 'userBasicEntity', ), - 'data_class' => 'Tests\Boekkooi\Bundle\JqueryValidationBundle\Functional\TestBundle\Form\Model\SimpleData' + 'data_class' => 'Tests\Boekkooi\Bundle\JqueryValidationBundle\Functional\TestBundle\Form\Model\SimpleData', )); } diff --git a/tests/Functional/TestBundle/Form/Type/RootDataFormType.php b/tests/Functional/TestBundle/Form/Type/RootDataFormType.php index 311aa58..e3c3c94 100644 --- a/tests/Functional/TestBundle/Form/Type/RootDataFormType.php +++ b/tests/Functional/TestBundle/Form/Type/RootDataFormType.php @@ -22,7 +22,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(array( - 'data_class' => 'Tests\Boekkooi\Bundle\JqueryValidationBundle\Functional\TestBundle\Form\Model\RootData' + 'data_class' => 'Tests\Boekkooi\Bundle\JqueryValidationBundle\Functional\TestBundle\Form\Model\RootData', )); } diff --git a/tests/Functional/TestBundle/Form/Type/SimpleDataFormType.php b/tests/Functional/TestBundle/Form/Type/SimpleDataFormType.php index 7dc7a2a..e76c420 100644 --- a/tests/Functional/TestBundle/Form/Type/SimpleDataFormType.php +++ b/tests/Functional/TestBundle/Form/Type/SimpleDataFormType.php @@ -21,7 +21,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(array( - 'data_class' => 'Tests\Boekkooi\Bundle\JqueryValidationBundle\Functional\TestBundle\Form\Model\SimpleData' + 'data_class' => 'Tests\Boekkooi\Bundle\JqueryValidationBundle\Functional\TestBundle\Form\Model\SimpleData', )); } diff --git a/tests/Functional/TestBundle/Form/Type/SimpleFormType.php b/tests/Functional/TestBundle/Form/Type/SimpleFormType.php index d56f660..4fcad51 100644 --- a/tests/Functional/TestBundle/Form/Type/SimpleFormType.php +++ b/tests/Functional/TestBundle/Form/Type/SimpleFormType.php @@ -17,13 +17,13 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'label' => 'Name', 'constraints' => array( new Constraints\NotBlank(), - new Constraints\Length(array('min' => 2)) - ) + new Constraints\Length(array('min' => 2)), + ), )) ->add('password', 'repeated', array( 'type' => 'password', 'constraints' => array( - new Constraints\NotBlank() + new Constraints\NotBlank(), ), 'first_options' => array('label' => 'Password'), 'second_options' => array('label' => 'Repeat Password'), diff --git a/tests/Functional/TestBundle/Form/Type/ViewTransformRulesFormType.php b/tests/Functional/TestBundle/Form/Type/ViewTransformRulesFormType.php index 39f6391..81d6bd3 100644 --- a/tests/Functional/TestBundle/Form/Type/ViewTransformRulesFormType.php +++ b/tests/Functional/TestBundle/Form/Type/ViewTransformRulesFormType.php @@ -17,15 +17,15 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'widget' => 'text', 'label' => 'Time text', 'constraints' => array( - new Constraints\NotBlank() + new Constraints\NotBlank(), ), )) ->add('equals', 'repeated', array( 'type' => 'text', 'constraints' => array( new Constraints\NotBlank(array( - 'groups' => 'main' - )) + 'groups' => 'main', + )), ), 'first_options' => array('label' => 'Text'), 'second_options' => array('label' => 'Repeat'), diff --git a/tests/Functional/TotalFormTest.php b/tests/Functional/TotalFormTest.php index 8b66e48..b98be20 100644 --- a/tests/Functional/TotalFormTest.php +++ b/tests/Functional/TotalFormTest.php @@ -11,7 +11,7 @@ class TotalFormTest extends FormTestCase protected static function getSymfonyOptions() { return array( - 'enable_additionals' => true + 'enable_additionals' => true, ); } diff --git a/tests/Functional/app/AppKernel.php b/tests/Functional/app/AppKernel.php index ebe50de..79f4357 100644 --- a/tests/Functional/app/AppKernel.php +++ b/tests/Functional/app/AppKernel.php @@ -13,7 +13,7 @@ public function registerBundles() new Boekkooi\Bundle\JqueryValidationBundle\BoekkooiJqueryValidationBundle(), - new Tests\Boekkooi\Bundle\JqueryValidationBundle\Functional\TestBundle\TestBundle() + new Tests\Boekkooi\Bundle\JqueryValidationBundle\Functional\TestBundle\TestBundle(), ); return $bundles; @@ -22,10 +22,11 @@ public function registerBundles() public function registerContainerConfiguration(LoaderInterface $loader) { if ($this->getEnvironment() === 'test') { - $loader->load(__DIR__ . '/config/config_test.yml'); + $loader->load(__DIR__.'/config/config_test.yml'); + return; } - $loader->load(__DIR__ . '/config/config.yml'); + $loader->load(__DIR__.'/config/config.yml'); } /** diff --git a/tests/Functional/app/config/config.yml b/tests/Functional/app/config/config.yml index ab26e84..155cd66 100644 --- a/tests/Functional/app/config/config.yml +++ b/tests/Functional/app/config/config.yml @@ -14,4 +14,4 @@ framework: boekkooi_jquery_validation: form: - additionals: true \ No newline at end of file + additionals: true diff --git a/tests/Functional/app/config/config_test.yml b/tests/Functional/app/config/config_test.yml index 6913b62..01574e6 100644 --- a/tests/Functional/app/config/config_test.yml +++ b/tests/Functional/app/config/config_test.yml @@ -14,4 +14,4 @@ framework: boekkooi_jquery_validation: form: - additionals: %enable_additionals% \ No newline at end of file + additionals: %enable_additionals% diff --git a/tests/Functional/app/config/routing.yml b/tests/Functional/app/config/routing.yml index 3286c89..99b134f 100644 --- a/tests/Functional/app/config/routing.yml +++ b/tests/Functional/app/config/routing.yml @@ -56,4 +56,4 @@ form_collection_datetime: form_additional_rules: path: '/additional_rules' defaults: - _controller: TestBundle:Form:additionalRules \ No newline at end of file + _controller: TestBundle:Form:additionalRules diff --git a/tests/Functional/web/index.php b/tests/Functional/web/index.php index b4c5064..600ac78 100644 --- a/tests/Functional/web/index.php +++ b/tests/Functional/web/index.php @@ -2,9 +2,9 @@ use Symfony\Component\HttpFoundation\Request; -$loader = require_once __DIR__ . '/../../bootstrap.php'; +$loader = require_once __DIR__.'/../../bootstrap.php'; -require_once __DIR__ . '/../app/AppKernel.php'; +require_once __DIR__.'/../app/AppKernel.php'; $kernel = new AppKernel('dev', true); diff --git a/tests/Unit/Form/FormRuleCompilerTest.php b/tests/Unit/Form/FormRuleCompilerTest.php index 9da9c90..698672f 100644 --- a/tests/Unit/Form/FormRuleCompilerTest.php +++ b/tests/Unit/Form/FormRuleCompilerTest.php @@ -32,7 +32,7 @@ public function provide_invalid_construct_arguments() array(array(new \stdClass())), array(array(false)), array(array(null)), - array(array('string')) + array(array('string')), ); } @@ -51,10 +51,9 @@ public function compile_should_forward_to_all_compilers() $SUT = new FormRuleCompiler(array( $compiler1, - $compiler2 + $compiler2, )); $SUT->compile($formRuleContext); } - } diff --git a/tests/Unit/Form/FormRuleProcessorTest.php b/tests/Unit/Form/FormRuleProcessorTest.php index 9f962bb..8dbfa55 100644 --- a/tests/Unit/Form/FormRuleProcessorTest.php +++ b/tests/Unit/Form/FormRuleProcessorTest.php @@ -32,7 +32,7 @@ public function provide_invalid_construct_arguments() array(array(new \stdClass())), array(array(false)), array(array(null)), - array(array('string')) + array(array('string')), ); } @@ -53,7 +53,7 @@ public function process_should_forward_to_all_processors() $SUT = new FormRuleProcessor(array( $processor1, - $processor2 + $processor2, )); $SUT->process($processContext, $formRuleContext); diff --git a/tests/Unit/Form/RuleCollectionTest.php b/tests/Unit/Form/RuleCollectionTest.php index 766a63c..77ad6c6 100644 --- a/tests/Unit/Form/RuleCollectionTest.php +++ b/tests/Unit/Form/RuleCollectionTest.php @@ -60,7 +60,7 @@ public function it_should_allow_adding_collections() array( 'rule' => $rule, 'rule1' => $rule1, - 'rule2' => $rule2 + 'rule2' => $rule2, ), $this->SUT->toArray() ); @@ -84,7 +84,7 @@ public function provide_invalid_set_arguments() array(new \stdClass()), array(null), array(1), - array(true) + array(true), ); } diff --git a/tests/Unit/Form/Util/FormHelperTest.php b/tests/Unit/Form/Util/FormHelperTest.php index 90a33be..a963636 100644 --- a/tests/Unit/Form/Util/FormHelperTest.php +++ b/tests/Unit/Form/Util/FormHelperTest.php @@ -102,7 +102,7 @@ public function provide_valid_form_names() return array( array('string_name', 'string_name'), - array($view, 'form_name') + array($view, 'form_name'), ); } @@ -121,7 +121,7 @@ public function provide_invalid_form_names() { return array( array(false), - array($this->getMock('Symfony\Component\Form\FormView')) + array($this->getMock('Symfony\Component\Form\FormView')), ); } @@ -185,7 +185,7 @@ public function provide_getValidationGroups_valid_return_values() return array( array(null), array(false), - array(array('my', 'valid', 'groups')) + array(array('my', 'valid', 'groups')), ); } @@ -207,5 +207,4 @@ public function getViewRoot_should_return_the_root_view() FormHelper::getViewRoot($formView) ); } - } diff --git a/tests/Unit/Validator/ConstraintCollectionTest.php b/tests/Unit/Validator/ConstraintCollectionTest.php index 980a702..5a0c154 100644 --- a/tests/Unit/Validator/ConstraintCollectionTest.php +++ b/tests/Unit/Validator/ConstraintCollectionTest.php @@ -81,7 +81,7 @@ public function provide_invalid_arguments() array(new \stdClass()), array(null), array(1), - array(true) + array(true), ); } } diff --git a/tests/bootstrap.php b/tests/bootstrap.php index fe9e8ed..aaa8f40 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,5 +1,5 @@