DeviceRepository   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A saveDevice() 0 6 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