Completed
Push — master ( 4407aa...f0730d )
by ANTHONIUS
22s queued 14s
created

GroupManager   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 18
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A findGroupByName() 0 3 1
A createGroup() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of the DoyoUserBundle project.
5
 *
6
 * (c) Anthonius Munthi <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Doyo\UserBundle\Manager;
15
16
/**
17
 * Abstract Group Manager implementation which can be used as base class for your
18
 * concrete manager.
19
 *
20
 * @author Anthonius Munthi <[email protected]>
21
 */
22
abstract class GroupManager implements GroupManagerInterface
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27 5
    public function createGroup($name)
28
    {
29 5
        $class = $this->getClass();
30
31 5
        return new $class($name);
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37 6
    public function findGroupByName($name)
38
    {
39 6
        return $this->findGroupBy(['name' => $name]);
40
    }
41
}
42