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
Pull Request — master (#68)
by Bidesh
03:32
created

StoreJobBusinessCaseFactory   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 5
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 33
ccs 0
cts 12
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A addBusinesCase() 0 5 1
A getBusinessCaseWithJob() 0 12 3
A getAllStoreJobBusinessCase() 0 4 1
1
<?php
2
/**
3
 * @package: chapi
4
 *
5
 * @author: bthapaliya
6
 * @since: 2017-01-03
7
 *
8
 */
9
10
namespace Chapi\BusinessCase\JobManagement;
11
12
13
class StoreJobBusinessCaseFactory implements StoreJobBusinessCaseFactoryInterface
14
{
15
    /**
16
     * @var StoreJobBusinessCaseInterface[]
17
     */
18
    private $storeJobBusinessCases;
19
20
    public function addBusinesCase(StoreJobBusinessCaseInterface $oStoreJob)
21
    {
22
        $this->storeJobBusinessCases[] = $oStoreJob;
23
24
    }
25
    public function getBusinessCaseWithJob($sJobName)
26
    {
27
        /** @var StoreJobBusinessCaseInterface $oStore */
28
        foreach ($this->storeJobBusinessCases as $oStore)
29
        {
30
            if ($oStore->isJobAvailable($sJobName))
31
            {
32
                return $oStore;
33
            }
34
        }
35
        return null;
36
    }
37
38
    /**
39
     * @return StoreJobBusinessCaseInterface[]
40
     */
41
    public function getAllStoreJobBusinessCase()
42
    {
43
        return $this->storeJobBusinessCases;
44
    }
45
}