Code Duplication    Length = 18-18 lines in 2 locations

src/BCMathExtended/BC.php 2 locations

@@ 344-361 (lines=18) @@
341
     * @param array|int|string,...
342
     * @return null|string
343
     */
344
    public static function max()
345
    {
346
        $max = null;
347
        $args = func_get_args();
348
        if (is_array($args[0])) {
349
            $args = $args[0];
350
        }
351
        foreach ($args as $number) {
352
            $number = self::convertScientificNotationToString($number);
353
            if (null === $max) {
354
                $max = $number;
355
            } else if (self::comp($max, $number) === self::COMPARE_RIGHT_GRATER) {
356
                $max = $number;
357
            }
358
        }
359
360
        return $max;
361
    }
362
363
    /**
364
     * @param array|int|string,...
@@ 367-384 (lines=18) @@
364
     * @param array|int|string,...
365
     * @return null|string
366
     */
367
    public static function min()
368
    {
369
        $min = null;
370
        $args = func_get_args();
371
        if (is_array($args[0])) {
372
            $args = $args[0];
373
        }
374
        foreach ($args as $number) {
375
            $number = self::convertScientificNotationToString($number);
376
            if (null === $min) {
377
                $min = $number;
378
            } else if (self::comp($min, $number) === self::COMPARE_LEFT_GRATER) {
379
                $min = $number;
380
            }
381
        }
382
383
        return $min;
384
    }
385
386
    /**
387
     * @param int|string $number