Conditions | 6 |
Paths | 1 |
Total Lines | 27 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | protected function init() { |
||
14 | |||
15 | $this->config->add('rank', null, function (int $rank = null) { |
||
|
|||
16 | |||
17 | return ((null !== $rank) ? ("ent.rank >= " . $rank) : ''); |
||
18 | }); |
||
19 | |||
20 | $this->config->add('time_registered >=', 0, function (int $time) { |
||
21 | |||
22 | return ((0 < $time) ? ("ent.time_registered >= " . $time) : ''); |
||
23 | }); |
||
24 | |||
25 | $this->config->add('time_registered <=', 0, function (int $time) { |
||
26 | |||
27 | return ((0 < $time) ? ("ent.time_registered <= " . $time) : ''); |
||
28 | }); |
||
29 | |||
30 | $this->config->add('time_logged >=', 0, function (int $time) { |
||
31 | |||
32 | return ((0 < $time) ? ("ent.time_logged >= " . $time) : ''); |
||
33 | }); |
||
34 | |||
35 | $this->config->add('time_logged <=', 0, function (int $time) { |
||
36 | |||
37 | return ((0 < $time) ? ("ent.time_logged <= " . $time) : ''); |
||
38 | }); |
||
39 | } |
||
40 | } |
||
42 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: