1 | <?php |
||
15 | class DeprecatedMagicAutoloadSniffTest extends BaseSniffTest |
||
|
|||
16 | { |
||
17 | const TEST_FILE = 'sniff-examples/deprecated_magic_autoload.php'; |
||
18 | |||
19 | /** |
||
20 | * Test PHP4 style constructors. |
||
21 | * |
||
22 | * @group deprecatedPHP4Constructors |
||
23 | * |
||
24 | * @dataProvider dataIsDeprecated |
||
25 | * |
||
26 | * @param int $line Line number where the error should occur. |
||
27 | * |
||
28 | * @return void |
||
29 | */ |
||
30 | public function testIsDeprecated($line) |
||
38 | |||
39 | /** |
||
40 | * dataIsDeprecated |
||
41 | * |
||
42 | * @see testIsDeprecated() |
||
43 | * |
||
44 | * @return array |
||
45 | */ |
||
46 | public function dataIsDeprecated() |
||
53 | |||
54 | |||
55 | /** |
||
56 | * Test valid methods with the same name as the class. |
||
57 | * |
||
58 | * @group deprecatedPHP4Constructors |
||
59 | * |
||
60 | * @dataProvider dataValidMethods |
||
61 | * |
||
62 | * @param int $line Line number where the error should occur. |
||
63 | * |
||
64 | * @return void |
||
65 | */ |
||
66 | public function testValidMethods($line) |
||
71 | |||
72 | /** |
||
73 | * dataValidMethods |
||
74 | * |
||
75 | * @see testValidMethods() |
||
76 | * |
||
77 | * @return array |
||
78 | */ |
||
79 | public function dataValidMethods() |
||
92 | } |
||
93 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.