Completed
Push — master ( 5b5b75...3e9700 )
by Joachim
05:03 queued 32s
created

CurrencyRepository::findOneByExternalId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 6
ccs 0
cts 4
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Loevgaard\DandomainFoundation\Repository;
4
5
use Loevgaard\DandomainFoundation\Entity\Currency;
6
use Loevgaard\DandomainFoundation\Entity\Generated\CurrencyInterface;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...rated\CurrencyInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Loevgaard\DandomainFoundation\Repository\Generated\CurrencyRepositoryTrait;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...CurrencyRepositoryTrait was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Symfony\Bridge\Doctrine\RegistryInterface;
9
10
class CurrencyRepository extends AbstractRepository
11
{
12
    use CurrencyRepositoryTrait;
13
14
    public function __construct(RegistryInterface $registry)
15
    {
16
        parent::__construct($registry, Currency::class);
17
    }
18
19
    public function findOneByExternalId(string $externalId): ?CurrencyInterface
20
    {
21
        /** @var CurrencyInterface $obj */
22
        $obj = $this->_findOneByExternalId($externalId);
23
24
        return $obj;
25
    }
26
27
    public function findOneByCode(string $code): ?CurrencyInterface
28
    {
29
        /** @var CurrencyInterface $obj */
30
        $obj = $this->findOneBy([
31
            'code' => $code
32
        ]);
33
34
        return $obj;
35
    }
36
}
37