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