Skip to content

Commit d67b8b4

Browse files
committed
Apply coding standard
1 parent 905f19e commit d67b8b4

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

src/Types/PhoneNumberType.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
final class PhoneNumberType extends Type
1515
{
16-
public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform) : ?string
16+
public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string
1717
{
1818
if ($value === null) {
1919
return null;
@@ -30,7 +30,7 @@ public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform)
3030
);
3131
}
3232

33-
public function convertToPHPValue(mixed $value, AbstractPlatform $platform) : ?PhoneNumber
33+
public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?PhoneNumber
3434
{
3535
if ($value === null) {
3636
return null;
@@ -48,10 +48,10 @@ public function convertToPHPValue(mixed $value, AbstractPlatform $platform) : ?P
4848
}
4949
}
5050

51-
public function getSQLDeclaration(array $column, AbstractPlatform $platform) : string
51+
public function getSQLDeclaration(array $column, AbstractPlatform $platform): string
5252
{
5353
// E.164 defines the maximum length as 15 digits, to which we add 1 char for the leading + sign.
54-
if (!isset($column['length'])) {
54+
if (! isset($column['length'])) {
5555
$column['length'] = 16;
5656
}
5757

tests/AbstractFunctionalTestCase.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ final protected static function createEntityManager(Connection $connection): Ent
2929
return new EntityManager($connection, self::createConfiguration());
3030
}
3131

32-
private static function createConfiguration(): Configuration
33-
{
34-
return ORMSetup::createAttributeMetadataConfiguration([__DIR__ . '/tests/Entity']);
35-
}
36-
3732
final protected static function truncateEntityTable(EntityManager $em): void
3833
{
3934
$em->createQueryBuilder()
@@ -50,4 +45,9 @@ final protected function getFirstEntity(EntityManager $em): ?User
5045
->getQuery()
5146
->getOneOrNullResult();
5247
}
48+
49+
private static function createConfiguration(): Configuration
50+
{
51+
return ORMSetup::createAttributeMetadataConfiguration([__DIR__ . '/tests/Entity']);
52+
}
5353
}

tests/Entity/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class User
1212
{
1313
#[ORM\Id]
14-
#[ORM\Column(type: "integer")]
14+
#[ORM\Column(type: 'integer')]
1515
#[ORM\GeneratedValue]
1616
public int $id;
1717

tests/Types/PhoneNumberTypeTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace Brick\PhoneNumber\Doctrine\Tests\Types;
66

7-
use Brick\PhoneNumber\PhoneNumber;
87
use Brick\PhoneNumber\Doctrine\Types\PhoneNumberType;
8+
use Brick\PhoneNumber\PhoneNumber;
99
use Doctrine\DBAL\Platforms\SQLitePlatform;
1010
use Doctrine\DBAL\Types\ConversionException;
1111
use Doctrine\DBAL\Types\Type;
@@ -15,11 +15,6 @@
1515

1616
class PhoneNumberTypeTest extends TestCase
1717
{
18-
private function getPhoneNumberType(): PhoneNumberType
19-
{
20-
return Type::getType('PhoneNumber');
21-
}
22-
2318
#[DataProvider('providerConvertToDatabaseValue')]
2419
public function testConvertToDatabaseValue(?PhoneNumber $value, ?string $expectedValue): void
2520
{
@@ -98,4 +93,9 @@ public static function providerConvertToPHPValueWithInvalidValue(): array
9893
['+33'],
9994
];
10095
}
96+
97+
private function getPhoneNumberType(): PhoneNumberType
98+
{
99+
return Type::getType('PhoneNumber');
100+
}
101101
}

0 commit comments

Comments
 (0)