Code Duplication    Length = 18-18 lines in 2 locations

src/BCMathExtended/BC.php 2 locations

@@ 239-256 (lines=18) @@
236
     * @param array|int|string,...
237
     * @return null|string
238
     */
239
    public static function max()
240
    {
241
        $max = null;
242
        $args = func_get_args();
243
        if (is_array($args[0])) {
244
            $args = $args[0];
245
        }
246
        foreach ($args as $number) {
247
            $number = self::convertScientificNotationToString($number);
248
            if (null === $max) {
249
                $max = $number;
250
            } else if (self::comp($max, $number) === self::COMPARE_RIGHT_GRATER) {
251
                $max = $number;
252
            }
253
        }
254
255
        return $max;
256
    }
257
258
    /**
259
     * @param string $leftOperand
@@ 284-301 (lines=18) @@
281
     * @param array|int|string,...
282
     * @return null|string
283
     */
284
    public static function min()
285
    {
286
        $min = null;
287
        $args = func_get_args();
288
        if (is_array($args[0])) {
289
            $args = $args[0];
290
        }
291
        foreach ($args as $number) {
292
            $number = self::convertScientificNotationToString($number);
293
            if (null === $min) {
294
                $min = $number;
295
            } else if (self::comp($min, $number) === self::COMPARE_LEFT_GRATER) {
296
                $min = $number;
297
            }
298
        }
299
300
        return $min;
301
    }
302
303
    /**
304
     * @param int|string $number