@@ 161-174 (lines=14) @@ | ||
158 | } |
|
159 | ||
160 | // If both structures are equal compare lengths of NPCG |
|
161 | for ($i = 0; $i < $maxStructureSize; $i++) { |
|
162 | // If current CG is NPCG |
|
163 | if ($initial[$i][0] === 1) { |
|
164 | if ($initial[$i][1] > $compared[$i][1]) { |
|
165 | return 1; |
|
166 | } |
|
167 | ||
168 | if ($initial[$i][1] < $compared[$i][1]) { |
|
169 | return -1; |
|
170 | } |
|
171 | } |
|
172 | ||
173 | // Current NPCG character groups have equal length - continue |
|
174 | } |
|
175 | ||
176 | // If both structures are equal and NPCG length are equal - compare lengths of PCG |
|
177 | for ($i = 0; $i < $maxStructureSize; $i++) { |
|
@@ 177-190 (lines=14) @@ | ||
174 | } |
|
175 | ||
176 | // If both structures are equal and NPCG length are equal - compare lengths of PCG |
|
177 | for ($i = 0; $i < $maxStructureSize; $i++) { |
|
178 | // If current CG is PCG |
|
179 | if ($initial[$i][0] === 0) { |
|
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 PCG character groups have equal length - continue |
|
190 | } |
|
191 | ||
192 | // Structures are absolutely equal |
|
193 | return 0; |