Skip to content

Commit b9b6da8

Browse files
authored
Merge pull request #874 from doctrine/cs-fixes
fix codestyle issues and remove obsolete code for PHP 7 support
2 parents f2f7406 + c65eb90 commit b9b6da8

23 files changed

+18
-30
lines changed

lib/Doctrine/ODM/PHPCR/DocumentManagerInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
45
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

lib/Doctrine/ODM/PHPCR/Id/IdException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static function conflictingChildName(
7272
string $parentFieldName,
7373
string $fieldNodeName,
7474
object $childDocument,
75-
string $childNodeName
75+
string $childNodeName,
7676
): self {
7777
$message = sprintf(
7878
'%s discovered as new child of %s in field "%s" has a node name '.

lib/Doctrine/ODM/PHPCR/Mapping/Attributes/MixedReferrers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
final class MixedReferrers implements MappingAttribute
99
{
1010
public function __construct(
11-
public ?string $referenceType = null
11+
public ?string $referenceType = null,
1212
) {
1313
}
1414
}

lib/Doctrine/ODM/PHPCR/Mapping/Attributes/ParentDocument.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class ParentDocument implements MappingAttribute
1515
public ?array $cascade;
1616

1717
public function __construct(
18-
string|array|null $cascade = null
18+
string|array|null $cascade = null,
1919
) {
2020
$this->cascade = null === $cascade ? null : (array) $cascade;
2121
}

lib/Doctrine/ODM/PHPCR/Mapping/Attributes/Reference.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function __construct(
1818
public ?string $property = null,
1919
public ?string $targetDocument = null,
2020
public string $strategy = 'weak',
21-
array|string|null $cascade = null
21+
array|string|null $cascade = null,
2222
) {
2323
$this->cascade = null === $cascade ? null : (array) $cascade;
2424
}

lib/Doctrine/ODM/PHPCR/Mapping/Attributes/Referrers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class Referrers implements MappingAttribute
1515
public function __construct(
1616
public string $referencedBy,
1717
public string $referringDocument,
18-
array|string|null $cascade = null
18+
array|string|null $cascade = null,
1919
) {
2020
$this->cascade = null === $cascade ? null : (array) $cascade;
2121
}

lib/Doctrine/ODM/PHPCR/Mapping/Driver/AttributeDriver.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
45
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

lib/Doctrine/ODM/PHPCR/Mapping/Driver/XmlDriver.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,7 @@ private function addReferenceMapping(PhpcrClassMetadata $class, \SimpleXMLElemen
276276
protected function loadMappingFile($file): array
277277
{
278278
$result = [];
279-
if (\PHP_VERSION_ID < 80000) {
280-
$entity = libxml_disable_entity_loader(true);
281-
}
282279
$xmlElement = simplexml_load_string(file_get_contents($file));
283-
if (\PHP_VERSION_ID < 80000) {
284-
libxml_disable_entity_loader($entity);
285-
}
286280

287281
foreach (['document', 'mapped-superclass'] as $type) {
288282
if (isset($xmlElement->$type)) {

lib/Doctrine/ODM/PHPCR/Query/Builder/ConverterPhpcr.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class ConverterPhpcr extends ConverterBase
6464

6565
public function __construct(
6666
DocumentManagerInterface $dm,
67-
QueryObjectModelFactoryInterface $qomf
67+
QueryObjectModelFactoryInterface $qomf,
6868
) {
6969
$this->qomf = $qomf;
7070
$this->mdf = $dm->getMetadataFactory();

lib/Doctrine/ODM/PHPCR/Query/Builder/QueryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* is to be fulfilled. The PHPCR converter walks over the query builder node
2525
* hierarchy and converts the object graph the PHPCR QOM object graph.
2626
*
27-
* @IgnoreException('factoryMethod')
27+
* @IgnoreException("factoryMethod")
2828
*
2929
* @author Daniel Leech <daniel@dantleech.com>
3030
*/

0 commit comments

Comments
 (0)