Code Duplication    Length = 18-18 lines in 2 locations

src/BCMathExtended/BC.php 2 locations

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