if ( $weight !== $prevWeight ) {
$this->groups[$prevWeight] = $group;
$prevWeight = $weight;
- if ( isset( $this->groups[$weight] ) ) {
- $group = $this->groups[$weight];
- } else {
- $group = [];
- }
+ $group = $this->groups[$weight] ?? [];
}
$group[] = $cp;
}
// character has a longer primary weight sequence with an initial
// portion equal to the first character, then remove the second
// character. This avoids having characters like U+A732 (double A)
- // polluting the basic latin sort area.
+ // polluting the basic Latin sort area.
foreach ( $this->groups as $weight => $group ) {
if ( preg_match( '/(\.[0-9A-F]*)\./', $weight, $m ) ) {