Completed
Pull Request — master (#4)
by ANTHONIUS
04:04
created

GroupManager::findGroupByName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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