@@ 177-190 (lines=14) @@ | ||
174 | } |
|
175 | ||
176 | // If both structures are equal compare lengths of NPCG |
|
177 | for ($i = 0; $i < $maxStructureSize; $i++) { |
|
178 | // If current CG is NPCG |
|
179 | if ($initial[$i][0] === 1) { |
|
180 | if ($initial[$i][1] > $compared[$i][1]) { |
|
181 | return 1; |
|
182 | } |
|
183 | ||
184 | if ($initial[$i][1] < $compared[$i][1]) { |
|
185 | return -1; |
|
186 | } |
|
187 | } |
|
188 | ||
189 | // Current NPCG character groups have equal length - continue |
|
190 | } |
|
191 | ||
192 | // If both structures are equal and NPCG length are equal - compare lengths of PCG |
|
193 | for ($i = 0; $i < $maxStructureSize; $i++) { |
|
@@ 193-206 (lines=14) @@ | ||
190 | } |
|
191 | ||
192 | // If both structures are equal and NPCG length are equal - compare lengths of PCG |
|
193 | for ($i = 0; $i < $maxStructureSize; $i++) { |
|
194 | // If current CG is PCG |
|
195 | if ($initial[$i][0] === 0) { |
|
196 | if ($initial[$i][1] > $compared[$i][1]) { |
|
197 | return -1; |
|
198 | } |
|
199 | ||
200 | if ($initial[$i][1] < $compared[$i][1]) { |
|
201 | return 1; |
|
202 | } |
|
203 | } |
|
204 | ||
205 | // Current PCG character groups have equal length - continue |
|
206 | } |
|
207 | ||
208 | // Structures are absolutely equal |
|
209 | return 0; |