Skip to content

Commit a05e51f

Browse files
vuongxuongminhStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent ae3a274 commit a05e51f

File tree

10 files changed

+8
-27
lines changed

10 files changed

+8
-27
lines changed

src/Bundle.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,5 @@
1515
*/
1616
class Bundle extends BaseBundle
1717
{
18-
1918
protected $name = 'PHPVietValidationBundle';
20-
2119
}

src/Constraints/IdVNValidator.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
namespace PHPViet\Symfony\Validation\Constraints;
99

10-
use PHPViet\Validation\Validator as ConcreteValidator;
1110
use Symfony\Component\Validator\Constraint;
1211
use Symfony\Component\Validator\ConstraintValidator;
12+
use PHPViet\Validation\Validator as ConcreteValidator;
1313
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
1414

1515
/**
@@ -18,13 +18,12 @@
1818
*/
1919
class IdVNValidator extends ConstraintValidator
2020
{
21-
2221
/**
2322
* {@inheritdoc}
2423
*/
2524
public function validate($value, Constraint $constraint): void
2625
{
27-
if (!$constraint instanceof IdVN) {
26+
if (! $constraint instanceof IdVN) {
2827
throw new UnexpectedTypeException($constraint, IdVN::class);
2928
}
3029

@@ -35,5 +34,4 @@ public function validate($value, Constraint $constraint): void
3534
->addViolation();
3635
}
3736
}
38-
3937
}

src/Constraints/IpVNValidator.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
namespace PHPViet\Symfony\Validation\Constraints;
99

10-
use PHPViet\Validation\Validator as ConcreteValidator;
1110
use Symfony\Component\Validator\Constraint;
1211
use Symfony\Component\Validator\ConstraintValidator;
12+
use PHPViet\Validation\Validator as ConcreteValidator;
1313
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
1414

1515
/**
@@ -18,13 +18,12 @@
1818
*/
1919
class IpVNValidator extends ConstraintValidator
2020
{
21-
2221
/**
2322
* {@inheritdoc}
2423
*/
2524
public function validate($value, Constraint $constraint): void
2625
{
27-
if (!$constraint instanceof IpVN) {
26+
if (! $constraint instanceof IpVN) {
2827
throw new UnexpectedTypeException($constraint, IpVN::class);
2928
}
3029

@@ -47,5 +46,4 @@ protected function getCode(?int $ipVersion): string
4746
return IpVN::IP_VN_ERROR;
4847
}
4948
}
50-
5149
}

src/Constraints/LandLineVNValidator.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
namespace PHPViet\Symfony\Validation\Constraints;
99

10-
use PHPViet\Validation\Validator as ConcreteValidator;
1110
use Symfony\Component\Validator\Constraint;
1211
use Symfony\Component\Validator\ConstraintValidator;
12+
use PHPViet\Validation\Validator as ConcreteValidator;
1313
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
1414

1515
/**
@@ -18,13 +18,12 @@
1818
*/
1919
class LandLineVNValidator extends ConstraintValidator
2020
{
21-
2221
/**
2322
* {@inheritdoc}
2423
*/
2524
public function validate($value, Constraint $constraint): void
2625
{
27-
if (!$constraint instanceof LandLineVN) {
26+
if (! $constraint instanceof LandLineVN) {
2827
throw new UnexpectedTypeException($constraint, LandLineVN::class);
2928
}
3029

@@ -35,5 +34,4 @@ public function validate($value, Constraint $constraint): void
3534
->addViolation();
3635
}
3736
}
38-
3937
}

src/Constraints/MobileVNValidator.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
namespace PHPViet\Symfony\Validation\Constraints;
99

10-
use PHPViet\Validation\Validator as ConcreteValidator;
1110
use Symfony\Component\Validator\Constraint;
1211
use Symfony\Component\Validator\ConstraintValidator;
12+
use PHPViet\Validation\Validator as ConcreteValidator;
1313
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
1414

1515
/**
@@ -18,13 +18,12 @@
1818
*/
1919
class MobileVNValidator extends ConstraintValidator
2020
{
21-
2221
/**
2322
* {@inheritdoc}
2423
*/
2524
public function validate($value, Constraint $constraint): void
2625
{
27-
if (!$constraint instanceof MobileVN) {
26+
if (! $constraint instanceof MobileVN) {
2827
throw new UnexpectedTypeException($constraint, MobileVN::class);
2928
}
3029

@@ -35,5 +34,4 @@ public function validate($value, Constraint $constraint): void
3534
->addViolation();
3635
}
3736
}
38-
3937
}

tests/Constraints/IdVNTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*/
1717
class IdVNTest extends TestCase
1818
{
19-
2019
public function testValid()
2120
{
2221
$this->context->expects($this->never())->method('buildViolation');
@@ -37,6 +36,4 @@ protected function getValidatorClass(): string
3736
{
3837
return IdVNValidator::class;
3938
}
40-
41-
4239
}

tests/Constraints/IpVNTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*/
1717
class IpVNTest extends TestCase
1818
{
19-
2019
public function testValid(): void
2120
{
2221
$this->context->expects($this->never())->method('buildViolation');

tests/Constraints/LandLineVNTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,4 @@ protected function getValidatorClass(): string
3636
{
3737
return LandLineVNValidator::class;
3838
}
39-
4039
}

tests/Constraints/MobileVNTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*/
1717
class MobileVNTest extends TestCase
1818
{
19-
2019
public function testValid()
2120
{
2221
$this->context->expects($this->never())->method('buildViolation');
@@ -37,5 +36,4 @@ protected function getValidatorClass(): string
3736
{
3837
return MobileVNValidator::class;
3938
}
40-
4139
}

tests/Constraints/TestCase.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
abstract class TestCase extends BaseTestCase
1717
{
18-
1918
/**
2019
* @var \Symfony\Component\Validator\Context\ExecutionContextInterface|\PHPUnit_Framework_MockObject_MockObject
2120
*/
@@ -46,5 +45,4 @@ protected function getConstraintsViolationBuilder()
4645
}
4746

4847
abstract protected function getValidatorClass(): string;
49-
5048
}

0 commit comments

Comments
 (0)