1 | <?php |
||
14 | class Law { |
||
15 | const VOTATION = 0; |
||
16 | const EFFECTIVE = 1; |
||
17 | const OBSOLETE = 2; |
||
18 | const REFUSED = 3; |
||
19 | |||
20 | const SECTORTAX = 1; |
||
21 | const SECTORNAME = 2; |
||
22 | const COMTAXEXPORT = 3; |
||
23 | const COMTAXIMPORT = 4; |
||
24 | const MILITARYSUBVENTION = 5; |
||
25 | const TECHNOLOGYTRANSFER = 6; |
||
26 | const PEACEPACT = 7; |
||
27 | const WARDECLARATION = 8; |
||
28 | const TOTALALLIANCE = 9; |
||
29 | const NEUTRALPACT = 10; |
||
30 | const PUNITION = 11; |
||
31 | |||
32 | |||
33 | const VOTEDURATION = 86400; |
||
34 | |||
35 | public $id = 0; |
||
36 | public $rColor = 0; |
||
37 | public $type = ''; |
||
38 | public $options = array(); |
||
39 | public $statement = 0; |
||
40 | public $dEndVotation = ''; |
||
41 | public $dEnd = ''; |
||
42 | public $dCreation = ''; |
||
43 | |||
44 | public $forVote = 0; |
||
45 | public $againstVote = 0; |
||
46 | |||
47 | /** |
||
48 | * @param int $id |
||
49 | * @return Law |
||
50 | */ |
||
51 | public function setId($id) |
||
57 | |||
58 | /** |
||
59 | * @return int |
||
60 | */ |
||
61 | public function getId() |
||
65 | |||
66 | /** |
||
67 | * @param int $factionId |
||
68 | * @return Law |
||
69 | */ |
||
70 | public function setFactionId($factionId) |
||
76 | |||
77 | /** |
||
78 | * @return int |
||
79 | */ |
||
80 | public function getFactionId() |
||
84 | |||
85 | /** |
||
86 | * @param int $type |
||
87 | * @return Law |
||
88 | */ |
||
89 | public function setType($type) |
||
95 | |||
96 | /** |
||
97 | * @return int |
||
98 | */ |
||
99 | public function getType() |
||
103 | |||
104 | /** |
||
105 | * @param array $options |
||
106 | * @return Law |
||
107 | */ |
||
108 | public function setOptions($options) |
||
114 | |||
115 | /** |
||
116 | * @return array |
||
117 | */ |
||
118 | public function getOptions() |
||
122 | |||
123 | /** |
||
124 | * @param int $statement |
||
125 | * @return Law |
||
126 | */ |
||
127 | public function setStatement($statement) |
||
133 | |||
134 | /** |
||
135 | * @return int |
||
136 | */ |
||
137 | public function getStatement() |
||
141 | |||
142 | /** |
||
143 | * @param string $createdAt |
||
144 | * @return Law |
||
145 | */ |
||
146 | public function setCreatedAt($createdAt) |
||
152 | |||
153 | /** |
||
154 | * @return string |
||
155 | */ |
||
156 | public function getCreatedAt() |
||
160 | |||
161 | /** |
||
162 | * @param string $votedAt |
||
163 | * @return Law |
||
164 | */ |
||
165 | public function setVotedAt($votedAt) |
||
171 | |||
172 | /** |
||
173 | * @return string |
||
174 | */ |
||
175 | public function getVotedAt() |
||
179 | |||
180 | /** |
||
181 | * @param string $endedAt |
||
182 | * @return Law |
||
183 | */ |
||
184 | public function setEndedAt($endedAt) |
||
190 | |||
191 | /** |
||
192 | * @return string |
||
193 | */ |
||
194 | public function getEndedAt() |
||
198 | |||
199 | /** |
||
200 | * @param int $nbPositiveVotes |
||
201 | * @return Law |
||
202 | */ |
||
203 | public function setNbPositiveVotes($nbPositiveVotes) |
||
209 | |||
210 | /** |
||
211 | * @return int |
||
212 | */ |
||
213 | public function getNbPositiveVotes() |
||
217 | |||
218 | /** |
||
219 | * @param int $nbNegativeVotes |
||
220 | * @return Law |
||
221 | */ |
||
222 | public function setNbNegativeVotes($nbNegativeVotes) |
||
228 | |||
229 | /** |
||
230 | * @return int |
||
231 | */ |
||
232 | public function getNbNegativeVotes() |
||
236 | } |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.