Completed
Push — master ( 4407aa...f0730d )
by ANTHONIUS
22s queued 14s
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
/*
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