Code Duplication    Length = 6-6 lines in 2 locations

src/LTDBeget/structures/informationUnits/base/InformationUnit.php 2 locations

@@ 198-203 (lines=6) @@
195
     */
196
    protected static function convert(float $value, int $fromDimension, int $toDimension) : float
197
    {
198
        if($fromDimension > $toDimension) {
199
            $numberOfMultiplies = $fromDimension - $toDimension;
200
            for($i = 0; $i < $numberOfMultiplies; $i++) {
201
                $value *= self::$multiplier;
202
            }
203
        }
204
205
        if($fromDimension < $toDimension) {
206
            $numberOfDivides = $toDimension - $fromDimension;
@@ 205-210 (lines=6) @@
202
            }
203
        }
204
205
        if($fromDimension < $toDimension) {
206
            $numberOfDivides = $toDimension - $fromDimension;
207
            for($i = 0; $i < $numberOfDivides; $i++) {
208
                $value /= self::$multiplier;
209
            }
210
        }
211
212
        return $value;
213
    }