GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — dev ( 4095d1...89bae3 )
by Андрей
04:02
created

ExtEntryRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 1
cbo 3
dl 0
loc 32
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A findEntryByObjectInfo() 0 20 1
1
<?php
2
/**
3
 * @link  https://github.com/old-town/workflow-zf2-toolkit
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace OldTown\Workflow\ZF2\Toolkit\EntityRepository\DoctrineWorkflowStory;
7
8
use Doctrine\ORM\EntityRepository;
9
use OldTown\Workflow\ZF2\Toolkit\Entity\DoctrineWorkflowStory\ExtEntry;
10
11
12
/**
13
 * Class ExtEntryRepository
14
 *
15
 * @package OldTown\Workflow\ZF2\Toolkit\EntityRepository\DoctrineWorkflowStory
16
 */
17
class ExtEntryRepository extends EntityRepository
18
{
19
    /**
20
     * @param       $workflowName
21
     * @param array $objectHash
22
     *
23
     * @return ExtEntry
24
     *
25
     * @throws \Doctrine\ORM\NonUniqueResultException
26
     * @throws \Doctrine\ORM\NoResultException
27
     */
28
    public function findEntryByObjectInfo($workflowName, array $objectHash = [])
29
    {
30
        $entryClassName = ExtEntry::class;
31
32
        $dql = "
33
          SELECT
34
            entry
35
          FROM {$entryClassName} entry
36
          JOIN entry.objectsInfo objectInfo
37
          WHERE
38
              entry.workflowName = :workflowName
39
                AND
40
              objectInfo.hash IN (:hash)
41
          ";
42
        $query = $this->_em->createQuery($dql);
43
        $query->setParameter('workflowName', $workflowName);
44
        $query->setParameter('hash', $objectHash);
45
46
        return $query->getSingleResult();
47
    }
48
}
49