Code Duplication    Length = 10-10 lines in 2 locations

src/string/FixedVariableCG.php 1 location

@@ 103-112 (lines=10) @@
100
     * @inheritdoc
101
     * @param AbstractCG|FixedVariableCG|FixedVariableCG|VariableFixedCG $group
102
     */
103
    protected function compareLength(AbstractCG $group): int
104
    {
105
        // Fixed CG are equal
106
        if (($return = $this->fixedCG->compare($group->fixedCG)) === 0) {
107
            // Compare variable character groups
108
            $return = $this->variableCG->compare($group->variableCG);
109
        }
110
111
        return $return;
112
    }
113
}
114

src/string/VariableFixedCG.php 1 location

@@ 96-105 (lines=10) @@
93
     * @inheritdoc
94
     * @param VariableFixedCG $group
95
     */
96
    protected function compareLength(AbstractCG $group): int
97
    {
98
        // Fixed CG are equal
99
        if (($return = $this->compareFixed($group)) === 0) {
100
            // Compare variable character groups
101
            $return = $this->variableCG->compare($group->variableCG);
102
        }
103
104
        return $return;
105
    }
106
107
    /**
108
     * Longer fixed character group has higher priority.