Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Lines | 20 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
53 | View Code Duplication | public function init() |
|
54 | { |
||
55 | $this->router = new Router(); |
||
56 | $collection = $this->router->getRoutes(); |
||
57 | |||
58 | for ($i = 0; $i < 1000; ++$i) { |
||
59 | RouteFactory::generateLiteralRoute( |
||
60 | $collection, |
||
61 | "index." . $i, |
||
62 | Route::class, |
||
63 | "", |
||
64 | "/index" . $i); |
||
65 | |||
66 | RouteFactory::generateStandardRoute( |
||
67 | $collection, |
||
68 | "index.standard" . $i, |
||
69 | StandardRoute::class, |
||
70 | "/" . $i); |
||
71 | } |
||
72 | } |
||
73 | } |
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.