Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
26 | public function limit($limit, $force = false) |
||
27 | { |
||
28 | if (!$this->hasCompiledOption('ENABLE_UPDATE_DELETE_LIMIT')) { |
||
29 | if (!$force) { |
||
30 | return $this; |
||
31 | } |
||
32 | |||
33 | throw new SimpleCrudException('Unable to add LIMIT because ENABLE_UPDATE_DELETE_LIMIT compiled option is disabled'); |
||
34 | } |
||
35 | |||
36 | $this->limit = $limit; |
||
|
|||
37 | |||
38 | return $this; |
||
39 | } |
||
40 | |||
75 |
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: