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.

LegFixture::get()   B
last analyzed

Complexity

Conditions 5
Paths 5

Size

Total Lines 35
Code Lines 26

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 35
rs 8.439
cc 5
eloc 26
nc 5
nop 1
1
<?php
2
/*
3
 * This file is part of the prooph/php-ddd-cargo-sample.
4
 * (c) Alexander Miertsch <[email protected]>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 * 
9
 * Date: 28.02.14 - 20:09
10
 */
11
12
namespace CodelinerTest\CargoBackend\Fixture;
13
14
use Codeliner\CargoBackend\Model\Cargo\Leg;
15
16
/**
17
 * Class LegFixture
18
 *
19
 * @package CodelinerTest\CargoBackend\Fixture
20
 * @author Alexander Miertsch <[email protected]>
21
 */
22
class LegFixture 
23
{
24
    const HONGKONG_HAMBURG  = 'hongkong_hamburg';
25
    const HONGKONG_NEWYORK  = 'hongkong_newyork';
26
    const NEWYORK_HAMBURG   = 'newyork_hamburg';
27
    const HAMBURG_ROTTERDAM = 'hamburg_rotterdam';
28
29
    /**
30
     * @param string $aLegConstant
31
     * @return Leg
32
     */
33
    public static function get($aLegConstant)
34
    {
35
        switch($aLegConstant) {
36
            case self::HONGKONG_HAMBURG:
37
                return new Leg(
38
                    'Hongkong',
39
                    'Hamburg',
40
                    new \DateTimeImmutable('2014-01-20 10:00:00'),
41
                    new \DateTimeImmutable('2014-02-02 18:00:00')
42
                );
43
            case self::HONGKONG_NEWYORK:
44
                return new Leg(
45
                    'Hongkong',
46
                    'New York',
47
                    new \DateTimeImmutable('2014-01-20 10:00:00'),
48
                    new \DateTimeImmutable('2014-02-02 18:00:00')
49
                );
50
            case self::NEWYORK_HAMBURG:
51
                return new Leg(
52
                    'New York',
53
                    'Hamburg',
54
                    new \DateTimeImmutable('2014-02-20 10:00:00'),
55
                    new \DateTimeImmutable('2014-03-02 18:00:00')
56
                );
57
            case self::HAMBURG_ROTTERDAM:
58
                return new Leg(
59
                    'Hamburg',
60
                    'Rotterdam',
61
                    new \DateTimeImmutable('2014-03-10 10:00:00'),
62
                    new \DateTimeImmutable('2014-03-10 14:00:00')
63
                );
64
65
        }
66
67
    }
68
}