Completed
Push — master ( fa51b1...cc2045 )
by Serhii
13s
created

TicketRepository::batchSave()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 1
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace AppBundle\Repository;
4
5
class TicketRepository extends AbstractRepository
6
{
7
    /**
8
     * @param array $tickets
9
     */
10
    public function batchSave(array $tickets)
11
    {
12
        foreach ($tickets as $ticket) {
13
            $this->save($ticket, false);
14
        }
15
        $this->getEntityManager()->flush();
16
    }
17
}
18