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::findEntryByObjectInfo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 20
rs 9.4285
cc 1
eloc 8
nc 1
nop 2
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