Conditions | 6 |
Paths | 6 |
Total Lines | 24 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
44 | public function __construct($requestId, $score, $accept, $reject, $manual) |
||
45 | { |
||
46 | if (!is_int($requestId)) { |
||
47 | throw new \InvalidArgumentException('Request ID must be integer'); |
||
48 | } |
||
49 | if (!is_int($score)) { |
||
50 | throw new \InvalidArgumentException('Score must be integer'); |
||
51 | } |
||
52 | if (!is_bool($accept)) { |
||
53 | throw new \InvalidArgumentException('Accept flag must be boolean'); |
||
54 | } |
||
55 | if (!is_bool($reject)) { |
||
56 | throw new \InvalidArgumentException('Reject flag must be boolean'); |
||
57 | } |
||
58 | if (!is_bool($manual)) { |
||
59 | throw new \InvalidArgumentException('Manual flag must be boolean'); |
||
60 | } |
||
61 | |||
62 | $this->requestId = $requestId; |
||
63 | $this->score = $score; |
||
64 | $this->accept = $accept; |
||
65 | $this->reject = $reject; |
||
66 | $this->manual = $manual; |
||
67 | } |
||
68 | |||
109 |