Member::getObject()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * @author  Alexander Getmansky <[email protected]>
4
 * @package GetSky\RandomWinner
5
 */
6
namespace GetSky\RandomWinner;
7
8
/**
9
 * The implementation of a simple member.
10
 */
11
class Member implements MemberInterface
12
{
13
    /**
14
    * @var mixed
15
    */
16
    protected $object;
17
    /**
18
     * @var int
19
     */
20
    protected $chance;
21
22
    /**
23
     * @param $object mixed
24
     * @param $chance int
25
     */
26
    public function __construct($object, $chance)
27
    {
28
        $this->object = $object;
29
        $this->chance = (int)$chance;
30
    }
31
32
    /**
33
     * @return mixed
34
     */
35
    public function getObject()
36
    {
37
        return $this->object;
38
    }
39
40
    /**
41
     * @return int
42
     */
43
    public function getChance()
44
    {
45
        return $this->chance;
46
    }
47
}
48