cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,11 +1,17 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Validator\Person;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcher;
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcherInterface;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Validator\Constraints\Person\PersonHasCenter;
@@ -13,6 +19,10 @@ use Chill\PersonBundle\Validator\Constraints\Person\PersonHasCenterValidator;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
/**
* @internal
* @coversNothing
*/
class PersonHasCenterValidatorTest extends ConstraintValidatorTestCase
{
public function testValidateRequired()
@@ -30,13 +40,6 @@ class PersonHasCenterValidatorTest extends ConstraintValidatorTestCase
->assertRaised();
}
protected function getConstraint()
{
return new PersonHasCenter([
'message' => 'msg'
]);
}
protected function createValidator()
{
$parameterBag = $this->createMock(ParameterBagInterface::class);
@@ -45,12 +48,19 @@ class PersonHasCenterValidatorTest extends ConstraintValidatorTestCase
->with($this->equalTo('chill_person'))
->willReturn([
'validation' => [
'center_required' => true
]
'center_required' => true,
],
]);
$centerResolverDispatcher = $this->createMock(CenterResolverDispatcherInterface::class);
return new PersonHasCenterValidator($parameterBag, $centerResolverDispatcher);
}
protected function getConstraint()
{
return new PersonHasCenter([
'message' => 'msg',
]);
}
}