Passed
Push — master ( 9bba7f...685a87 )
by Julito
09:22
created

SettingsCurrentRepository::update()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\CoreBundle\Repository;
8
9
use Chamilo\CoreBundle\Entity\SettingsCurrent;
10
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
11
use Doctrine\Persistence\ManagerRegistry;
12
13
class SettingsCurrentRepository extends ServiceEntityRepository
14
{
15
    public function __construct(ManagerRegistry $registry)
16
    {
17
        parent::__construct($registry, SettingsCurrent::class);
18
    }
19
20
    public function update(SettingsCurrent $setting): void
21
    {
22
        $this->getEntityManager()->persist($setting);
23
        $this->getEntityManager()->flush();
24
    }
25
}
26