Completed
Pull Request — master (#4)
by ANTHONIUS
04:04
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
namespace Doyo\UserBundle\Manager;
4
5
/**
6
 * Abstract Group Manager implementation which can be used as base class for your
7
 * concrete manager.
8
 *
9
 * @author Anthonius Munthi <[email protected]>
10
 */
11
abstract class GroupManager implements GroupManagerInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16 5
    public function createGroup($name)
17
    {
18 5
        $class = $this->getClass();
19
20 5
        return new $class($name);
21
    }
22
23
    /**
24
     * {@inheritdoc}
25
     */
26 6
    public function findGroupByName($name)
27
    {
28 6
        return $this->findGroupBy(array('name' => $name));
29
    }
30
}
31