Code Duplication    Length = 10-10 lines in 3 locations

src/Discovery/DiscoveryManagerImpl.php 2 locations

@@ 349-358 (lines=10) @@
346
    /**
347
     * {@inheritdoc}
348
     */
349
    public function hasRootTypeDescriptors(Expression $expr = null)
350
    {
351
        $expr2 = Expr::method('getContainingPackage', Expr::same($this->rootPackage));
352
353
        if ($expr) {
354
            $expr2 = $expr2->andX($expr);
355
        }
356
357
        return $this->hasTypeDescriptors($expr2);
358
    }
359
360
    /**
361
     * {@inheritdoc}
@@ 631-640 (lines=10) @@
628
    /**
629
     * {@inheritdoc}
630
     */
631
    public function hasRootBindingDescriptors(Expression $expr = null)
632
    {
633
        $expr2 = Expr::method('getContainingPackage', Expr::same($this->rootPackage));
634
635
        if ($expr) {
636
            $expr2 = $expr2->andX($expr);
637
        }
638
639
        return $this->hasBindingDescriptors($expr2);
640
    }
641
642
    /**
643
     * {@inheritdoc}

src/Repository/RepositoryManagerImpl.php 1 location

@@ 330-339 (lines=10) @@
327
    /**
328
     * {@inheritdoc}
329
     */
330
    public function hasRootPathMappings(Expression $expr = null)
331
    {
332
        $expr2 = Expr::method('getContainingPackage', Expr::same($this->rootPackage));
333
334
        if ($expr) {
335
            $expr2 = $expr2->andX($expr);
336
        }
337
338
        return $this->hasPathMappings($expr2);
339
    }
340
341
    /**
342
     * {@inheritdoc}