Code Duplication    Length = 12-17 lines in 2 locations

tests/Doubler/Generator/ClassMirrorTest.php 2 locations

@@ 187-203 (lines=17) @@
184
    /**
185
     * @test
186
     */
187
    public function it_marks_passed_by_reference_args_as_passed_by_reference()
188
    {
189
        $class = new \ReflectionClass('Fixtures\Prophecy\WithReferences');
190
191
        $mirror = new ClassMirror();
192
193
        $classNode = $mirror->reflect($class, array());
194
195
        $this->assertTrue($classNode->hasMethod('methodWithReferenceArgument'));
196
197
        $argNodes = $classNode->getMethod('methodWithReferenceArgument')->getArguments();
198
199
        $this->assertCount(2, $argNodes);
200
201
        $this->assertTrue($argNodes[0]->isPassedByReference());
202
        $this->assertTrue($argNodes[1]->isPassedByReference());
203
    }
204
205
    /**
206
     * @test
@@ 352-363 (lines=12) @@
349
    /**
350
     * @test
351
     */
352
    public function it_doesnt_use_scalar_typehints()
353
    {
354
        $mirror = new ClassMirror();
355
356
        $classNode = $mirror->reflect(new \ReflectionClass('ReflectionMethod'), array());
357
        $method = $classNode->getMethod('export');
358
        $arguments = $method->getArguments();
359
360
        $this->assertNull($arguments[0]->getTypeHint());
361
        $this->assertNull($arguments[1]->getTypeHint());
362
        $this->assertNull($arguments[2]->getTypeHint());
363
    }
364
365
    /**
366
     * @test