Completed
Push — master ( 25d51e...4712d7 )
by Guillaume
02:08
created

UserRepository::save()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 5
ccs 0
cts 4
cp 0
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * File part of the Redmine User Provider bundle
4
 *
5
 * @category  SymfonyBundle
6
 * @package   GMaissa.RedmineUserProviderBundle
7
 * @author    Guillaume Maïssa <[email protected]>
8
 * @copyright 2017 Guillaume Maïssa
9
 * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
10
 */
11
12
namespace GMaissa\RedmineUserProviderBundle\Repository\Doctrine\Orm;
13
14
use Doctrine\ORM\EntityRepository;
15
use GMaissa\RedmineUserProviderBundle\Repository\UserRepositoryInterface;
16
use Symfony\Component\Security\Core\User\UserInterface;
17
18
/**
19
 * Doctrine ORM User Repository Class
20
 */
21
class UserRepository extends EntityRepository implements UserRepositoryInterface
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function save(UserInterface $user)
27
    {
28
        $this->_em->persist($user);
29
        $this->_em->flush();
30
    }
31
}
32