getOrderNumbersReadyForNextRelease()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: k127
5
 * Date: 11.12.15
6
 * Time: 15:49
7
 */
8
9
namespace Manavo\DoneDone;
10
11
/**
12
 * Class ReleaseBuildInfo
13
 * @package Manavo\DoneDone
14
 */
15
class ReleaseBuildInfo
16
{
17
    /** @var int */
18
    private $id = null;
19
    /** @var string */
20
    private $title = null;
21
    /** @var array of int */
22
    private $order_numbers_ready_for_next_release = [];
23
24
    /**
25
     * ReleaseBuildInfo constructor.
26
     * @param array|null $data
27
     */
28 6
    function __construct($data = null)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
29
    {
30 6
        $this->id = $data['id'];
31 6
        $this->title = $data['title'];
32 6
        $this->order_numbers_ready_for_next_release = $data['order_numbers_ready_for_next_release'];
33 6
    }
34
35
    /**
36
     * @return int
37
     */
38 3
    public function getId()
39
    {
40 3
        return $this->id;
41
    }
42
43
    /**
44
     * @return string
45
     */
46 3
    public function getTitle()
47
    {
48 3
        return $this->title;
49
    }
50
51
    /**
52
     * @return array
53
     */
54 3
    public function getOrderNumbersReadyForNextRelease()
55
    {
56 3
        return $this->order_numbers_ready_for_next_release;
57
    }
58
59
    /**
60
     * @return array
61
     */
62 3
    public function toArray()
63
    {
64
        $data = [
65 3
            'id'                                   => $this->id,
66 3
            'title'                                => $this->title,
67 3
            'order_numbers_ready_for_next_release' => $this->order_numbers_ready_for_next_release,
68 3
        ];
69
70 3
        return $data;
71
    }
72
}
73