Member   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 37
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getObject() 0 4 1
A getChance() 0 4 1
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