Code Duplication    Length = 8-9 lines in 10 locations

src/test/php/PDepend/Source/Language/PHP/PHPParserGenericVersion70Test.php 4 locations

@@ 195-203 (lines=9) @@
192
     *
193
     * @return void
194
     */
195
    public function testFunctionReturnTypeHintCallable()
196
    {
197
        $type = $this->getFirstFunctionForTestCase()->getReturnType();
198
199
        $this->assertFalse($type->isScalar());
200
        $this->assertFalse($type->isArray());
201
202
        $this->assertSame('callable', $type->getImage());
203
    }
204
205
    /**
206
     * testFunctionReturnTypeHintClass
@@ 210-218 (lines=9) @@
207
     *
208
     * @return void
209
     */
210
    public function testFunctionReturnTypeHintClass()
211
    {
212
        $type = $this->getFirstFunctionForTestCase()->getReturnType();
213
214
        $this->assertFalse($type->isScalar());
215
        $this->assertFalse($type->isArray());
216
217
        $this->assertSame('\Iterator', $type->getImage());
218
    }
219
220
    /**
221
     * testClosureReturnTypeHintInt
@@ 290-298 (lines=9) @@
287
     *
288
     * @return void
289
     */
290
    public function testClosureReturnTypeHintCallable()
291
    {
292
        $type = $this->getFirstClosureForTestCase()->getReturnType();
293
294
        $this->assertFalse($type->isScalar());
295
        $this->assertFalse($type->isArray());
296
297
        $this->assertSame('callable', $type->getImage());
298
    }
299
300
    /**
301
     * testClosureReturnTypeHintClass
@@ 305-313 (lines=9) @@
302
     *
303
     * @return void
304
     */
305
    public function testClosureReturnTypeHintClass()
306
    {
307
        $type = $this->getFirstClosureForTestCase()->getReturnType();
308
309
        $this->assertFalse($type->isScalar());
310
        $this->assertFalse($type->isArray());
311
312
        $this->assertSame('\\Iterator', $type->getImage());
313
    }
314
315
    /**
316
     * testSpaceshipOperatorWithStrings

src/test/php/PDepend/Source/Language/PHP/PHPParserVersion70Test.php 4 locations

@@ 199-207 (lines=9) @@
196
     *
197
     * @return void
198
     */
199
    public function testFunctionReturnTypeHintCallable()
200
    {
201
        $type = $this->getFirstFunctionForTestCase()->getReturnType();
202
203
        $this->assertFalse($type->isScalar());
204
        $this->assertFalse($type->isArray());
205
206
        $this->assertSame('callable', $type->getImage());
207
    }
208
209
    /**
210
     * testFunctionReturnTypeHintClass
@@ 214-222 (lines=9) @@
211
     *
212
     * @return void
213
     */
214
    public function testFunctionReturnTypeHintClass()
215
    {
216
        $type = $this->getFirstFunctionForTestCase()->getReturnType();
217
218
        $this->assertFalse($type->isScalar());
219
        $this->assertFalse($type->isArray());
220
221
        $this->assertSame('\Iterator', $type->getImage());
222
    }
223
224
    /**
225
     * testClosureReturnTypeHintInt
@@ 294-302 (lines=9) @@
291
     *
292
     * @return void
293
     */
294
    public function testClosureReturnTypeHintCallable()
295
    {
296
        $type = $this->getFirstClosureForTestCase()->getReturnType();
297
298
        $this->assertFalse($type->isScalar());
299
        $this->assertFalse($type->isArray());
300
301
        $this->assertSame('callable', $type->getImage());
302
    }
303
304
    /**
305
     * testClosureReturnTypeHintClass
@@ 309-317 (lines=9) @@
306
     *
307
     * @return void
308
     */
309
    public function testClosureReturnTypeHintClass()
310
    {
311
        $type = $this->getFirstClosureForTestCase()->getReturnType();
312
313
        $this->assertFalse($type->isScalar());
314
        $this->assertFalse($type->isArray());
315
316
        $this->assertSame('\\Iterator', $type->getImage());
317
    }
318
319
    /**
320
     * testSpaceshipOperatorWithStrings

src/test/php/PDepend/Source/Language/PHP/PHPParserVersion71Test.php 2 locations

@@ 139-146 (lines=8) @@
136
    /**
137
     * @return void
138
     */
139
    public function testIterableTypeHintReturn()
140
    {
141
        $type = $this->getFirstFunctionForTestCase()->getReturnType();
142
        
143
        $this->assertFalse($type->isScalar());
144
        $this->assertTrue($type->isArray());
145
        $this->assertSame('iterable', $type->getImage());
146
    }
147
148
    /**
149
     * @return void
@@ 151-158 (lines=8) @@
148
    /**
149
     * @return void
150
     */
151
    public function testVoidTypeHintReturn()
152
    {
153
        $type = $this->getFirstFunctionForTestCase()->getReturnType();
154
        
155
        $this->assertTrue($type->isScalar());
156
        $this->assertFalse($type->isArray());
157
        $this->assertSame('void', $type->getImage());
158
    }
159
160
    /**
161
     * @param \PDepend\Source\Tokenizer\Tokenizer $tokenizer