Skip to content

Commit 9176173

Browse files
authored
Fix docblocks on nullable EM properties (#9273)
1 parent 95d434d commit 9176173

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

lib/Doctrine/ORM/EntityManager.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
/**
121121
* The expression builder instance used to generate query expressions.
122122
*
123-
* @var Expr
123+
* @var Expr|null
124124
*/
125125
private $expressionBuilder;
126126

@@ -134,11 +134,15 @@
134134
/**
135135
* Collection of query filters.
136136
*
137-
* @var FilterCollection
137+
* @var FilterCollection|null
138138
*/
139139
private $filterCollection;
140140

141-
/** @var Cache The second level cache regions API. */
141+
/**
142+
* The second level cache regions API.
143+
*
144+
* @var Cache|null
145+
*/
142146
private $cache;
143147

144148
/**

psalm-baseline.xml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -447,11 +447,8 @@
447447
<code>getProxyNamespace</code>
448448
<code>merge</code>
449449
</DeprecatedMethod>
450-
<DocblockTypeContradiction occurrences="9">
450+
<DocblockTypeContradiction occurrences="6">
451451
<code>$entityName !== null &amp;&amp; ! is_string($entityName)</code>
452-
<code>$this-&gt;expressionBuilder === null</code>
453-
<code>$this-&gt;filterCollection === null</code>
454-
<code>$this-&gt;filterCollection === null</code>
455452
<code>is_object($entity)</code>
456453
<code>is_object($entity)</code>
457454
<code>is_object($entity)</code>
@@ -507,21 +504,13 @@
507504
<code>createCache</code>
508505
<code>getCacheFactory</code>
509506
</PossiblyNullReference>
510-
<PropertyNotSetInConstructor occurrences="3">
511-
<code>$cache</code>
512-
<code>$expressionBuilder</code>
513-
<code>$filterCollection</code>
514-
</PropertyNotSetInConstructor>
515507
<PropertyTypeCoercion occurrences="1">
516508
<code>new $metadataFactoryClassName()</code>
517509
</PropertyTypeCoercion>
518510
<RedundantCondition occurrences="2">
519511
<code>is_object($connection)</code>
520512
<code>is_object($connection)</code>
521513
</RedundantCondition>
522-
<RedundantConditionGivenDocblockType occurrences="1">
523-
<code>$this-&gt;filterCollection !== null</code>
524-
</RedundantConditionGivenDocblockType>
525514
<TypeDoesNotContainType occurrences="2">
526515
<code>': "' . $connection . '"'</code>
527516
<code>gettype($connection)</code>

0 commit comments

Comments
 (0)