| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 6 | function run() |
||
| 7 | { |
||
| 8 | $teamNumber = 10; |
||
| 9 | $rndFiller = new \App\Lib\DsManager\Helpers\RandomFiller(); |
||
| 10 | for ($i = 1; $i <= $teamNumber; $i++) { |
||
| 11 | $team = $rndFiller->getTeam($rndFiller->getLocale()); |
||
| 12 | $teamArray = $team->toArray(); |
||
| 13 | $teamO = \App\Lib\DsManager\Models\Orm\Team::create($teamArray); |
||
| 14 | foreach ($teamArray['roster'] as $player) { |
||
| 15 | $player['team_id'] = $teamO->id; |
||
| 16 | \App\Lib\DsManager\Models\Orm\Player::create($player); |
||
| 17 | } |
||
| 18 | $teamArray['coach']['team_id'] = $teamO->id; |
||
| 19 | \App\Lib\DsManager\Models\Orm\Coach::create($teamArray['coach']); |
||
| 20 | } |
||
| 21 | } |
||
| 22 | } |
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.