Code Duplication    Length = 12-17 lines in 2 locations

tests/Doubler/Generator/ClassMirrorTest.php 2 locations

@@ 185-201 (lines=17) @@
182
    /**
183
     * @test
184
     */
185
    public function it_marks_passed_by_reference_args_as_passed_by_reference()
186
    {
187
        $class = new \ReflectionClass('Fixtures\Prophecy\WithReferences');
188
189
        $mirror = new ClassMirror();
190
191
        $classNode = $mirror->reflect($class, array());
192
193
        $this->assertTrue($classNode->hasMethod('methodWithReferenceArgument'));
194
195
        $argNodes = $classNode->getMethod('methodWithReferenceArgument')->getArguments();
196
197
        $this->assertCount(2, $argNodes);
198
199
        $this->assertTrue($argNodes[0]->isPassedByReference());
200
        $this->assertTrue($argNodes[1]->isPassedByReference());
201
    }
202
203
    /**
204
     * @test
@@ 367-378 (lines=12) @@
364
    /**
365
     * @test
366
     */
367
    public function it_doesnt_use_scalar_typehints()
368
    {
369
        $mirror = new ClassMirror();
370
371
        $classNode = $mirror->reflect(new \ReflectionClass('ReflectionMethod'), array());
372
        $method = $classNode->getMethod('export');
373
        $arguments = $method->getArguments();
374
375
        $this->assertNull($arguments[0]->getTypeHint());
376
        $this->assertNull($arguments[1]->getTypeHint());
377
        $this->assertNull($arguments[2]->getTypeHint());
378
    }
379
380
    /**
381
     * @test