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