| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function save(array $players) |
||
| 32 | { |
||
| 33 | if (empty($players)) { |
||
| 34 | return; |
||
| 35 | } |
||
| 36 | |||
| 37 | foreach ($players as $player) { |
||
| 38 | var_dump($player->getId()); |
||
|
|
|||
| 39 | $player = $this->getEntityManager()->merge($player); |
||
| 40 | $this->getEntityManager()->persist($player); |
||
| 41 | } |
||
| 42 | |||
| 43 | $this->getEntityManager()->flush(); |
||
| 44 | } |
||
| 45 | } |
||
| 46 |