Conditions | 4 |
Paths | 6 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
68 | public function merge(GlSpellCheckerError $mergeerror) { |
||
69 | $this->msg .= ' ' . $mergeerror->msg; |
||
70 | $this->word .= ' ' . $mergeerror->word; |
||
71 | if ($mergeerror->length > $this->length) { |
||
72 | $this->length = $mergeerror->length; |
||
73 | } |
||
74 | |||
75 | if (isset($mergeerror->suggs)) { |
||
76 | if (isset($this->suggs)) { |
||
77 | $this->suggs = array_merge($this->suggs,$mergeerror->suggs); |
||
78 | } else { |
||
79 | $this->suggs = $mergeerror->suggs; |
||
80 | } |
||
81 | } |
||
82 | } |
||
83 | |||
124 |
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: