Failed Conditions
Branch experimental/sf (68db07)
by Kentaro
42:17 queued 33:39
created

PluginRepository   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 33.33%

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
ccs 2
cts 6
cp 0.3333
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A findAllEnabled() 0 4 1
A findByCode() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Eccube\Repository;
15
16
use Eccube\Entity\Plugin;
17
use Symfony\Bridge\Doctrine\RegistryInterface;
18
19
/**
20
 * PluginRepository
21
 *
22
 * This class was generated by the Doctrine ORM. Add your own custom
23
 * repository methods below.
24
 */
25
class PluginRepository extends AbstractRepository
26
{
27 428
    public function __construct(RegistryInterface $registry)
28
    {
29 428
        parent::__construct($registry, Plugin::class);
30
    }
31
32
    public function findAllEnabled()
33
    {
34
        return $this->findBy(['enabled' => '1']);
35
    }
36
37
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$code" missing
Loading history...
38
     * @param $code プラグインコード
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
39
     *
40
     * @return Plugin
41
     */
42
    public function findByCode($code)
43
    {
44
        return $this->findOneBy(['code' => $code]);
45
    }
46
}
47