Conditions | 1 |
Paths | 1 |
Total Lines | 35 |
Code Lines | 22 |
Lines | 35 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
12 | public function provideInvalidData() |
||
13 | { |
||
14 | return [ |
||
15 | 'empty string' => [ |
||
16 | 'input' => '', |
||
17 | ], |
||
18 | 'not integer' => [ |
||
19 | 'input' => 'N;', |
||
20 | ], |
||
21 | 'missing tag' => [ |
||
22 | 'input' => ':0;', |
||
23 | ], |
||
24 | 'missing value' => [ |
||
25 | 'input' => 'i:;', |
||
26 | ], |
||
27 | 'missing semicolon' => [ |
||
28 | 'input' => 'i:0', |
||
29 | ], |
||
30 | 'sign only' => [ |
||
31 | 'input' => 'i:+;', |
||
32 | ], |
||
33 | 'multiple sign' => [ |
||
34 | 'input' => 'i:++6;', |
||
35 | ], |
||
36 | 'float value' => [ |
||
37 | 'input' => 'i:1.0;', |
||
38 | ], |
||
39 | 'hex value' => [ |
||
40 | 'input' => 'i:0x50;', |
||
41 | ], |
||
42 | 'binary value' => [ |
||
43 | 'input' => 'i:0b111;', |
||
44 | ], |
||
45 | ]; |
||
46 | } |
||
47 | |||
62 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.