doctrine / orm

@@ -216,14 +216,14 @@
Loading
216 216
    /**
217 217
     * All pending collection deletions.
218 218
     *
219 -
     * @psalm-var array<int, Collection<array-key, object>>
219 +
     * @psalm-var array<int, PersistentCollection<array-key, object>>
220 220
     */
221 221
    private array $collectionDeletions = [];
222 222
223 223
    /**
224 224
     * All pending collection updates.
225 225
     *
226 -
     * @psalm-var array<int, Collection<array-key, object>>
226 +
     * @psalm-var array<int, PersistentCollection<array-key, object>>
227 227
     */
228 228
    private array $collectionUpdates = [];
229 229
@@ -232,7 +232,7 @@
Loading
232 232
     * At the end of the UnitOfWork all these collections will make new snapshots
233 233
     * of their data.
234 234
     *
235 -
     * @psalm-var array<int, Collection<array-key, object>>
235 +
     * @psalm-var array<int, PersistentCollection<array-key, object>>
236 236
     */
237 237
    private array $visitedCollections = [];
238 238
@@ -374,12 +374,6 @@
Loading
374 374
        try {
375 375
            // Collection deletions (deletions of complete collections)
376 376
            foreach ($this->collectionDeletions as $collectionToDelete) {
377 -
                if (! $collectionToDelete instanceof PersistentCollection) {
378 -
                    $this->getCollectionPersister($collectionToDelete->getMapping())->delete($collectionToDelete);
379 -
380 -
                    continue;
381 -
                }
382 -
383 377
                // Deferred explicit tracked collections can be removed only when owning relation was persisted
384 378
                $owner = $collectionToDelete->getOwner();
385 379
@@ -2792,7 +2786,7 @@
Loading
2792 2786
    /**
2793 2787
     * Gets the currently scheduled complete collection deletions
2794 2788
     *
2795 -
     * @psalm-return array<int, Collection<array-key, object>>
2789 +
     * @psalm-return array<int, PersistentCollection<array-key, object>>
2796 2790
     */
2797 2791
    public function getScheduledCollectionDeletions(): array
2798 2792
    {
@@ -2802,7 +2796,7 @@
Loading
2802 2796
    /**
2803 2797
     * Gets the currently scheduled collection inserts, updates and deletes.
2804 2798
     *
2805 -
     * @psalm-return array<int, Collection<array-key, object>>
2799 +
     * @psalm-return array<int, PersistentCollection<array-key, object>>
2806 2800
     */
2807 2801
    public function getScheduledCollectionUpdates(): array
2808 2802
    {

@@ -85,7 +85,7 @@
Loading
85 85
     *
86 86
     * @param EntityManagerInterface $em    The EntityManager the collection will be associated with.
87 87
     * @param ClassMetadata          $class The class descriptor of the entity type of this collection.
88 -
     * @psalm-param Collection<TKey, T> $collection The collection elements.
88 +
     * @psalm-param Collection<TKey, T>&Selectable<TKey, T> $collection The collection elements.
89 89
     */
90 90
    public function __construct(
91 91
        EntityManagerInterface $em,
@@ -612,11 +612,12 @@
Loading
612 612
    /**
613 613
     * Retrieves the wrapped Collection instance.
614 614
     *
615 -
     * @return Collection<TKey, T>
615 +
     * @return Collection<TKey, T>&Selectable<TKey, T>
616 616
     */
617 617
    public function unwrap(): Collection
618 618
    {
619 -
        assert($this->collection !== null);
619 +
        assert($this->collection instanceof Collection);
620 +
        assert($this->collection instanceof Selectable);
620 621
621 622
        return $this->collection;
622 623
    }

@@ -26,6 +26,7 @@
Loading
26 26
 * The paginator can handle various complex scenarios with DQL.
27 27
 *
28 28
 * @template-covariant T
29 +
 * @implements IteratorAggregate<array-key, T>
29 30
 */
30 31
class Paginator implements Countable, IteratorAggregate
31 32
{

@@ -646,6 +646,8 @@
Loading
646 646
     *
647 647
     * @psalm-param LockMode::* $lockMode
648 648
     *
649 +
     * @return $this
650 +
     *
649 651
     * @throws TransactionRequiredException
650 652
     */
651 653
    public function setLockMode(LockMode|int $lockMode): self
Files Coverage
lib/Doctrine/ORM 89.64%
Project Totals (330 files) 89.64%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading