| @@ 157-170 (lines=14) @@ | ||
| 154 | } |
|
| 155 | ||
| 156 | // If both structures are equal compare lengths of NPCG |
|
| 157 | for ($i = 0; $i < $maxStructureSize; $i++) { |
|
| 158 | // If current CG is NPCG |
|
| 159 | if ($initial[$i][0] === 1) { |
|
| 160 | if ($initial[$i][1] > $compared[$i][1]) { |
|
| 161 | return 1; |
|
| 162 | } |
|
| 163 | ||
| 164 | if ($initial[$i][1] < $compared[$i][1]) { |
|
| 165 | return -1; |
|
| 166 | } |
|
| 167 | } |
|
| 168 | ||
| 169 | // Current NPCG character groups have equal length - continue |
|
| 170 | } |
|
| 171 | ||
| 172 | // If both structures are equal and NPCG length are equal - compare lengths of PCG |
|
| 173 | for ($i = 0; $i < $maxStructureSize; $i++) { |
|
| @@ 173-186 (lines=14) @@ | ||
| 170 | } |
|
| 171 | ||
| 172 | // If both structures are equal and NPCG length are equal - compare lengths of PCG |
|
| 173 | for ($i = 0; $i < $maxStructureSize; $i++) { |
|
| 174 | // If current CG is PCG |
|
| 175 | if ($initial[$i][0] === 0) { |
|
| 176 | if ($initial[$i][1] > $compared[$i][1]) { |
|
| 177 | return -1; |
|
| 178 | } |
|
| 179 | ||
| 180 | if ($initial[$i][1] < $compared[$i][1]) { |
|
| 181 | return 1; |
|
| 182 | } |
|
| 183 | } |
|
| 184 | ||
| 185 | // Current PCG character groups have equal length - continue |
|
| 186 | } |
|
| 187 | ||
| 188 | // Structures are absolutely equal |
|
| 189 | return 0; |
|