| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 54 | public function testRandomizer() |
||
| 55 | { |
||
| 56 | $yes = 0; |
||
| 57 | $no = 0; |
||
| 58 | echo "\n"; |
||
| 59 | |||
| 60 | for ($i = 1; $i <= 100; $i++) { |
||
| 61 | echo $i . " . "; |
||
| 62 | if (\App\Lib\DsManager\Helpers\Randomizer::boolOnPercentage(20)) { |
||
| 63 | echo "yes"; |
||
| 64 | $yes++; |
||
| 65 | } else { |
||
| 66 | echo "nope"; |
||
| 67 | $no++; |
||
| 68 | } |
||
| 69 | echo "\n $yes - $no\n"; |
||
| 70 | } |
||
| 71 | |||
| 72 | } |
||
| 73 | |||
| 90 |
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.