DeviceRepository::saveDevice()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
/**
3
 * Push notification server example (http://github.com/juliangut/tify_example)
4
 *
5
 * @link https://github.com/juliangut/tify_example for the canonical source repository
6
 *
7
 * @license https://github.com/juliangut/tify_example/blob/master/LICENSE
8
 */
9
10
namespace Jgut\Pusher\Repository;
11
12
use Doctrine\ORM\EntityRepository;
13
use Jgut\Pusher\Entity\DeviceEntity;
14
15
/**
16
 * Class DeviceRepository
17
 */
18
class DeviceRepository extends EntityRepository
19
{
20
    /**
21
     * @param DeviceEntity $device
22
     */
23
    public function saveDevice(DeviceEntity $device)
24
    {
25
        $entityManager = $this->getEntityManager();
26
        $entityManager->persist($device);
27
        $entityManager->flush();
28
    }
29
}
30