Skip to content

Commit

Permalink
Coding Standards
Browse files Browse the repository at this point in the history
  • Loading branch information
Lustmored committed Apr 4, 2021
1 parent 4c88027 commit 86a114f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 45 deletions.
1 change: 1 addition & 0 deletions lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -1648,6 +1648,7 @@ protected function _validateAndCompleteAssociationMapping(array $mapping)
$joinColumn['nullable'] = true;
}
}

unset($joinColumn);
}

Expand Down
27 changes: 7 additions & 20 deletions tests/Doctrine/Tests/Models/TypedProperties/UserTyped.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

namespace Doctrine\Tests\Models\TypedProperties;

use Doctrine\ORM\Mapping as ORM;

use DateInterval;
use DateTime;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
use Doctrine\Tests\Models\CMS\CmsEmail;

Expand Down Expand Up @@ -93,34 +92,22 @@ public static function loadMetadata(ClassMetadataInfo $metadata): void
]
);
$metadata->mapField(
[
'fieldName' => 'dateInterval',
]
['fieldName' => 'dateInterval']
);
$metadata->mapField(
[
'fieldName' => 'dateTime',
]
['fieldName' => 'dateTime']
);
$metadata->mapField(
[
'fieldName' => 'dateTimeImmutable',
]
['fieldName' => 'dateTimeImmutable']
);
$metadata->mapField(
[
'fieldName' => 'array',
]
['fieldName' => 'array']
);
$metadata->mapField(
[
'fieldName' => 'boolean',
]
['fieldName' => 'boolean']
);
$metadata->mapField(
[
'fieldName' => 'float',
]
['fieldName' => 'float']
);

$metadata->mapOneToOne(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
use function strtolower;

use const CASE_UPPER;
use const PHP_VERSION_ID;

abstract class AbstractMappingDriverTest extends OrmTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,46 +31,29 @@
]
);
$metadata->mapField(
[
'fieldName' => 'dateInterval',
]
['fieldName' => 'dateInterval']
);
$metadata->mapField(
[
'fieldName' => 'dateTime',
]
['fieldName' => 'dateTime']
);
$metadata->mapField(
[
'fieldName' => 'dateTimeImmutable',
]
['fieldName' => 'dateTimeImmutable']
);
$metadata->mapField(
[
'fieldName' => 'array',
]
['fieldName' => 'array']
);
$metadata->mapField(
[
'fieldName' => 'boolean',
]
['fieldName' => 'boolean']
);
$metadata->mapField(
[
'fieldName' => 'float',
]
['fieldName' => 'float']
);

$metadata->mapOneToOne(
[
'fieldName' => 'email',
'cascade' =>
[0 => 'persist'],
'joinColumns' =>
[
0 =>
[],
],
'cascade' => [0 => 'persist'],
'joinColumns' => [[]],
'orphanRemoval' => true,
]
);

0 comments on commit 86a114f

Please sign in to comment.