Completed
Push — master ( 9396da...236110 )
by Joachim
15:12
created

VariantGroupRepository   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A findOneByExternalId() 0 6 1
A __construct() 0 3 1
1
<?php
2
3
namespace Loevgaard\DandomainFoundation\Repository;
4
5
use Loevgaard\DandomainFoundation\Entity\Generated\VariantGroupInterface;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...d\VariantGroupInterface 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...
6
use Loevgaard\DandomainFoundation\Entity\VariantGroup;
7
use Loevgaard\DandomainFoundation\Repository\Generated\VariantGroupRepositoryTrait;
0 ignored issues
show
Bug introduced by
The type Loevgaard\DandomainFound...antGroupRepositoryTrait 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
/**
11
 * @method null|VariantGroupInterface find($id)
12
 * @method VariantGroupInterface[]    findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null)
13
 * @method null|VariantGroupInterface findOneBy(array $criteria)
14
 * @method VariantGroupInterface[]    findAll()
15
 */
16
class VariantGroupRepository extends AbstractRepository
17
{
18
    use VariantGroupRepositoryTrait;
19
20
    public function __construct(RegistryInterface $registry)
21
    {
22
        parent::__construct($registry, VariantGroup::class);
23
    }
24
25
    public function findOneByExternalId(int $externalId): ?VariantGroupInterface
26
    {
27
        /** @var VariantGroupInterface $obj */
28
        $obj = $this->_findOneByExternalId($externalId);
29
30
        return $obj;
31
    }
32
}
33