Code Duplication    Length = 10-10 lines in 3 locations

Tests/Sniffs/PHP/NonStaticMagicMethodsSniffTest.php 3 locations

@@ 192-201 (lines=10) @@
189
     *
190
     * @return void
191
     */
192
    public function testWrongMethodVisibility($methodName, $desiredVisibility, $testVisibility, $line, $isTrait = false)
193
    {
194
        if ($isTrait === true && self::$recognizesTraits === false) {
195
            $this->markTestSkipped();
196
            return;
197
        }
198
199
        $file = $this->getTestFile($isTrait);
200
        $this->assertError($file, $line, "Visibility for magic method {$methodName} must be {$desiredVisibility}. Found: {$testVisibility}");
201
    }
202
203
    /**
204
     * Data provider.
@@ 271-280 (lines=10) @@
268
     *
269
     * @return void
270
     */
271
    public function testWrongStaticMethod($methodName, $line, $isTrait = false)
272
    {
273
        if ($isTrait === true && self::$recognizesTraits === false) {
274
            $this->markTestSkipped();
275
            return;
276
        }
277
278
        $file = $this->getTestFile($isTrait);
279
        $this->assertError($file, $line, "Magic method {$methodName} cannot be defined as static.");
280
    }
281
282
    /**
283
     * Data provider.
@@ 342-351 (lines=10) @@
339
     *
340
     * @return void
341
     */
342
    public function testWrongNonStaticMethod($methodName, $line, $isTrait = false)
343
    {
344
        if ($isTrait === true && self::$recognizesTraits === false) {
345
            $this->markTestSkipped();
346
            return;
347
        }
348
349
        $file = $this->getTestFile($isTrait);
350
        $this->assertError($file, $line, "Magic method {$methodName} must be defined as static.");
351
    }
352
353
    /**
354
     * Data provider.