Completed
Push — develop ( b92fd0...28494b )
by
unknown
23:27 queued 12:02
created

InvoiceAddressDrafts::findByJobId()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
rs 9.4285
cc 2
eloc 6
nc 2
nop 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright  2013 - 2016 Cross Solution <http://cross-solution.de>
8
 */
9
  
10
/** */
11
namespace Orders\Repository;
12
13
use Core\Repository\AbstractRepository;
14
15
/**
16
 * ${CARET}
17
 * 
18
 * @author Mathias Gelhausen <[email protected]>
19
 * @todo write test 
20
 */
21
class InvoiceAddressDrafts extends AbstractRepository
22
{
23
    /**
24
     *
25
     *
26
     * @var array
27
     */
28
    protected $entities;
29
30
    public function findByJobId($jobId)
31
    {
32
        if (isset($this->entities[$jobId])) {
33
            return $this->entities[$jobId];
34
        }
35
36
        $entity = $this->findOneBy(['jobId' => $jobId]);
37
        $this->entities[$jobId] = $entity;
38
39
        return $entity;
40
    }
41
}