Completed
Push — master ( 80114d...06e447 )
by Nils
02:56
created

CardRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A findCardByGameAndTeam() 0 8 1
1
<?php
2
namespace Torakel\DatabaseBundle\Repository;
3
4
use Torakel\DatabaseBundleBundle\Entity\Game;
0 ignored issues
show
Bug introduced by
The type Torakel\DatabaseBundleBundle\Entity\Game 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...
5
use Torakel\DatabaseBundleBundle\Entity\Team;
0 ignored issues
show
Bug introduced by
The type Torakel\DatabaseBundleBundle\Entity\Team 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 Doctrine\ORM\EntityRepository;
0 ignored issues
show
Bug introduced by
The type Doctrine\ORM\EntityRepository 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
8
/**
9
 * Class CardRepository
10
 * @package Torakel\DatabaseBundleBundle\Repository
11
 */
12
class CardRepository extends EntityRepository
13
{
14
15
    /**
16
     * findCardByGameAndTeam
17
     *
18
     *
19
     *
20
     * @param Game $game
21
     * @param Team $team
22
     * @return mixed
23
     */
24
    public function findCardByGameAndTeam(Game $game, Team $team)
25
    {
26
        $cards = $this->getEntityManager()
27
            ->createQuery(
28
                'SELECT c FROM TorakelDatabaseBundle:Card c WHERE c.game = :game AND c.team = :team'
29
            )->setParameter('game', $game)->setParameter('team', $team)
30
            ->getResult();
31
        return $cards;
32
    }
33
}