Code Duplication    Length = 18-18 lines in 2 locations

src/BCMathExtended/BC.php 2 locations

@@ 355-372 (lines=18) @@
352
     * @param array|int|string,...
353
     * @return null|string
354
     */
355
    public static function max()
356
    {
357
        $max = null;
358
        $args = func_get_args();
359
        if (is_array($args[0])) {
360
            $args = $args[0];
361
        }
362
        foreach ($args as $number) {
363
            $number = self::convertScientificNotationToString($number);
364
            if (null === $max) {
365
                $max = $number;
366
            } elseif (self::comp($max, $number) === self::COMPARE_RIGHT_GRATER) {
367
                $max = $number;
368
            }
369
        }
370
371
        return $max;
372
    }
373
374
    /**
375
     * @param array|int|string,...
@@ 378-395 (lines=18) @@
375
     * @param array|int|string,...
376
     * @return null|string
377
     */
378
    public static function min()
379
    {
380
        $min = null;
381
        $args = func_get_args();
382
        if (is_array($args[0])) {
383
            $args = $args[0];
384
        }
385
        foreach ($args as $number) {
386
            $number = self::convertScientificNotationToString($number);
387
            if (null === $min) {
388
                $min = $number;
389
            } elseif (self::comp($min, $number) === self::COMPARE_LEFT_GRATER) {
390
                $min = $number;
391
            }
392
        }
393
394
        return $min;
395
    }
396
397
    /**
398
     * @param int|string $number