Code Duplication    Length = 34-34 lines in 2 locations

Tests/Units/QueryRepositoryTestCase.php 1 location

@@ 43-76 (lines=34) @@
40
     * @param \Closure  $phpExtensionFactory
41
     * @param Analyzer  $analyzer
42
     */
43
    public function __construct(
44
        Adapter $adapter = null,
45
        Extractor $annotationExtractor = null,
46
        Generator $asserterGenerator = null,
47
        Manager $assertionManager = null,
48
        \Closure $reflectionClassFactory = null,
49
        \Closure $phpExtensionFactory = null,
50
        Analyzer $analyzer = null
51
    ) {
52
        parent::__construct(
53
            $adapter,
54
            $annotationExtractor,
55
            $asserterGenerator,
56
            $assertionManager,
57
            $reflectionClassFactory,
58
            $phpExtensionFactory,
59
            $analyzer
60
        );
61
62
        $this->getAssertionManager()
63
            ->setHandler(
64
                'randomRepository',
65
                function ($size = null) {
66
                    return $this->randomRepository($size);
67
                }
68
            )
69
            ->setHandler(
70
                'emptyRepository',
71
                function () {
72
                    return $this->emptyRepository();
73
                }
74
            )
75
        ;
76
    }
77
78
    /**
79
     * {@inheritdoc}

Tests/Units/RepositoryTestCase.php 1 location

@@ 42-75 (lines=34) @@
39
     * @param \Closure  $phpExtensionFactory
40
     * @param Analyzer  $analyzer
41
     */
42
    public function __construct(
43
        Adapter $adapter = null,
44
        Extractor $annotationExtractor = null,
45
        Generator $asserterGenerator = null,
46
        Manager $assertionManager = null,
47
        \Closure $reflectionClassFactory = null,
48
        \Closure $phpExtensionFactory = null,
49
        Analyzer $analyzer = null
50
    ) {
51
        parent::__construct(
52
            $adapter,
53
            $annotationExtractor,
54
            $asserterGenerator,
55
            $assertionManager,
56
            $reflectionClassFactory,
57
            $phpExtensionFactory,
58
            $analyzer
59
        );
60
61
        $this->getAssertionManager()
62
            ->setHandler(
63
                'randomRepository',
64
                function ($size = null) {
65
                    return $this->randomRepository($size);
66
                }
67
            )
68
            ->setHandler(
69
                'emptyRepository',
70
                function () {
71
                    return $this->emptyRepository();
72
                }
73
            )
74
        ;
75
    }
76
77
    /**
78
     * @param int $size