Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f76bab2

Browse files
authored
Merge pull request #10790 from greg0ire/slevomat-cs-upgrade
Work around slevomat/coding-standard issues
2 parents 4c3bd20 + 0e06d6b commit f76bab2

8 files changed

Lines changed: 16 additions & 29 deletions

File tree

lib/Doctrine/ORM/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ public function newDefaultAnnotationDriver($paths = [], $useSimpleAnnotationRead
208208
}
209209

210210
/**
211-
* @deprecated No replacement planned.
212-
*
213211
* Adds a namespace under a certain alias.
214212
*
213+
* @deprecated No replacement planned.
214+
*
215215
* @param string $alias
216216
* @param string $namespace
217217
*

lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ static function (string $fieldName) use ($data, $class) {
313313
* that belongs to a particular component/class. Afterwards, all these chunks
314314
* are processed, one after the other. For each chunk of class data only one of the
315315
* following code paths is executed:
316-
*
317316
* Path A: The data chunk belongs to a joined/associated object and the association
318317
* is collection-valued.
319318
* Path B: The data chunk belongs to a joined/associated object and the association

lib/Doctrine/ORM/Query/Exec/AbstractSqlExecutor.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,9 @@ public function removeQueryCacheProfile()
5353
/**
5454
* Executes all sql statements.
5555
*
56-
* @param Connection $conn The database connection that is used to execute the queries.
57-
* @psalm-param list<mixed>|array<string, mixed> $params The parameters.
58-
* @psalm-param array<int, int|string|Type|null>|
59-
* array<string, int|string|Type|null> $types The parameter types.
56+
* @param Connection $conn The database connection that is used to execute the queries.
57+
* @param list<mixed>|array<string, mixed> $params The parameters.
58+
* @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types The parameter types.
6059
*
6160
* @return Result|int
6261
*/

lib/Doctrine/ORM/Query/Parser.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2566,7 +2566,8 @@ public function ConditionalPrimary()
25662566
* EmptyCollectionComparisonExpression | CollectionMemberExpression |
25672567
* InstanceOfExpression
25682568
*
2569-
* @return AST\BetweenExpression|
2569+
* @return AST\Node
2570+
* @psalm-return AST\BetweenExpression|
25702571
* AST\CollectionMemberExpression|
25712572
* AST\ComparisonExpression|
25722573
* AST\EmptyCollectionComparisonExpression|

phpstan-baseline.neon

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -395,21 +395,6 @@ parameters:
395395
count: 1
396396
path: lib/Doctrine/ORM/Query/Parser.php
397397

398-
-
399-
message: """
400-
#^PHPDoc tag @return has invalid value \\(AST\\\\BetweenExpression\\|
401-
AST\\\\CollectionMemberExpression\\|
402-
AST\\\\ComparisonExpression\\|
403-
AST\\\\EmptyCollectionComparisonExpression\\|
404-
AST\\\\ExistsExpression\\|
405-
AST\\\\InExpression\\|
406-
AST\\\\InstanceOfExpression\\|
407-
AST\\\\LikeExpression\\|
408-
AST\\\\NullComparisonExpression\\)\\: Unexpected token "\\\\n \\* ", expected type at offset 344$#
409-
"""
410-
count: 1
411-
path: lib/Doctrine/ORM/Query/Parser.php
412-
413398
-
414399
message: "#^Parameter \\#2 \\$stringPattern of class Doctrine\\\\ORM\\\\Query\\\\AST\\\\LikeExpression constructor expects Doctrine\\\\ORM\\\\Query\\\\AST\\\\Functions\\\\FunctionNode\\|Doctrine\\\\ORM\\\\Query\\\\AST\\\\InputParameter\\|Doctrine\\\\ORM\\\\Query\\\\AST\\\\Literal\\|Doctrine\\\\ORM\\\\Query\\\\AST\\\\PathExpression, Doctrine\\\\ORM\\\\Query\\\\AST\\\\Node given\\.$#"
415400
count: 1

tests/Doctrine/Tests/ORM/Functional/Ticket/GH5804Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class GH5804Article
103103
* @Id
104104
* @Column(type="GH5804Type", length=255)
105105
* @GeneratedValue(strategy="CUSTOM")
106-
* @CustomIdGenerator(class=\Doctrine\Tests\ORM\Functional\Ticket\GH5804Generator::class)
106+
* @CustomIdGenerator(class=GH5804Generator::class)
107107
*/
108108
public $id;
109109

tests/Doctrine/Tests/ORM/Tools/Export/ClassMetadataExporterTestCase.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
1616
use Doctrine\ORM\Mapping\Driver\XmlDriver;
1717
use Doctrine\ORM\Mapping\Driver\YamlDriver;
18+
use Doctrine\ORM\Mapping\PostPersist;
19+
use Doctrine\ORM\Mapping\PrePersist;
1820
use Doctrine\ORM\Tools\DisconnectedClassMetadataFactory;
1921
use Doctrine\ORM\Tools\EntityGenerator;
2022
use Doctrine\ORM\Tools\Export\ClassMetadataExporter;
@@ -399,26 +401,26 @@ class Group
399401
}
400402
class UserListener
401403
{
402-
/** @\Doctrine\ORM\Mapping\PrePersist */
404+
/** @PrePersist */
403405
public function customPrePersist(): void
404406
{
405407
}
406408

407-
/** @\Doctrine\ORM\Mapping\PostPersist */
409+
/** @PostPersist */
408410
public function customPostPersist(): void
409411
{
410412
}
411413
}
412414
class GroupListener
413415
{
414-
/** @\Doctrine\ORM\Mapping\PrePersist */
416+
/** @PrePersist */
415417
public function prePersist(): void
416418
{
417419
}
418420
}
419421
class AddressListener
420422
{
421-
/** @\Doctrine\ORM\Mapping\PostPersist */
423+
/** @PostPersist */
422424
public function customPostPersist(): void
423425
{
424426
}

tests/Doctrine/Tests/ORM/Tools/SchemaValidatorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,8 @@ class DDC1649Two
384384
{
385385
/**
386386
* @var DDC1649One
387-
* @Id @ManyToOne(targetEntity="DDC1649One")
387+
* @Id
388+
* @ManyToOne(targetEntity="DDC1649One")
388389
*/
389390
public $one;
390391
}

0 commit comments

Comments
 (0)