@@ -13,10 +13,8 @@ |
||
13 | 13 | |
14 | 14 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
15 | 15 | use Symfony\Component\Config\FileLocator; |
16 | -use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; |
|
17 | 16 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; |
18 | 17 | use Symfony\Component\DependencyInjection\Loader; |
19 | -use Symfony\Component\Yaml\Parser as YamlParser; |
|
20 | 18 | |
21 | 19 | /** |
22 | 20 | * This is the class that loads and manages your bundle configuration |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $class_info = new \ReflectionClass($this); |
39 | 39 | $dir = dirname($class_info->getFileName()); |
40 | 40 | |
41 | - $loader = new Loader\YamlFileLoader($container, new FileLocator($dir.'/../Resources/config')); |
|
41 | + $loader = new Loader\YamlFileLoader($container, new FileLocator($dir . '/../Resources/config')); |
|
42 | 42 | $loader->load('services.yml'); |
43 | 43 | } |
44 | 44 | } |
@@ -72,7 +72,7 @@ |
||
72 | 72 | $this->validator->validate($regon, $constraint); |
73 | 73 | |
74 | 74 | $this->buildViolation('myMessage') |
75 | - ->setParameter('{{ value }}', '"'.$regon.'"') |
|
75 | + ->setParameter('{{ value }}', '"' . $regon . '"') |
|
76 | 76 | ->assertRaised(); |
77 | 77 | } |
78 | 78 |
@@ -72,7 +72,7 @@ |
||
72 | 72 | $this->validator->validate($nip, $constraint); |
73 | 73 | |
74 | 74 | $this->buildViolation('myMessage') |
75 | - ->setParameter('{{ value }}', '"'.$nip.'"') |
|
75 | + ->setParameter('{{ value }}', '"' . $nip . '"') |
|
76 | 76 | ->assertRaised(); |
77 | 77 | } |
78 | 78 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $this->validator->validate($pesel, $constraint); |
85 | 85 | |
86 | 86 | $this->buildViolation('myMessage') |
87 | - ->setParameter('{{ value }}', '"'.$pesel.'"') |
|
87 | + ->setParameter('{{ value }}', '"' . $pesel . '"') |
|
88 | 88 | ->assertRaised(); |
89 | 89 | } |
90 | 90 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $this->validator->validate($pesel, $constraint); |
102 | 102 | |
103 | 103 | $this->buildViolation('myMessage') |
104 | - ->setParameter('{{ value }}', '"'.$pesel.'"') |
|
104 | + ->setParameter('{{ value }}', '"' . $pesel . '"') |
|
105 | 105 | ->assertRaised(); |
106 | 106 | } |
107 | 107 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | public function validate($value, Constraint $constraint) |
31 | 31 | { |
32 | 32 | if (!$constraint instanceof Pesel) { |
33 | - throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Pesel'); |
|
33 | + throw new UnexpectedTypeException($constraint, __NAMESPACE__ . '\Pesel'); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | if (null === $value || '' === $value) { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $value = (string) $value; |
45 | 45 | |
46 | 46 | $validator = new \Kiczort\PolishValidator\PeselValidator(); |
47 | - if (! $validator->isValid($value, array('strict' => (bool)$constraint->strict))) { |
|
47 | + if (!$validator->isValid($value, array('strict' => (bool) $constraint->strict))) { |
|
48 | 48 | if ($this->context instanceof ExecutionContextInterface) { |
49 | 49 | $this->context->buildViolation($constraint->message) |
50 | 50 | ->setParameter('{{ value }}', $this->formatValue($value)) |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | public function validate($value, Constraint $constraint) |
31 | 31 | { |
32 | 32 | if (!$constraint instanceof Nip) { |
33 | - throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Nip'); |
|
33 | + throw new UnexpectedTypeException($constraint, __NAMESPACE__ . '\Nip'); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | if (null === $value || '' === $value) { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $value = (string) $value; |
45 | 45 | |
46 | 46 | $validator = new \Kiczort\PolishValidator\NipValidator(); |
47 | - if (! $validator->isValid($value)) { |
|
47 | + if (!$validator->isValid($value)) { |
|
48 | 48 | if ($this->context instanceof ExecutionContextInterface) { |
49 | 49 | $this->context->buildViolation($constraint->message) |
50 | 50 | ->setParameter('{{ value }}', $this->formatValue($value)) |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | public function validate($value, Constraint $constraint) |
31 | 31 | { |
32 | 32 | if (!$constraint instanceof Regon) { |
33 | - throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Regon'); |
|
33 | + throw new UnexpectedTypeException($constraint, __NAMESPACE__ . '\Regon'); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | if (null === $value || '' === $value) { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $value = (string) $value; |
45 | 45 | |
46 | 46 | $validator = new \Kiczort\PolishValidator\RegonValidator(); |
47 | - if (! $validator->isValid($value)) { |
|
47 | + if (!$validator->isValid($value)) { |
|
48 | 48 | if ($this->context instanceof ExecutionContextInterface) { |
49 | 49 | $this->context->buildViolation($constraint->message) |
50 | 50 | ->setParameter('{{ value }}', $this->formatValue($value)) |