Code Duplication    Length = 18-18 lines in 2 locations

src/BCMathExtended/BC.php 2 locations

@@ 214-231 (lines=18) @@
211
     * @param array|int|string,...
212
     * @return null|string
213
     */
214
    public static function max()
215
    {
216
        $max = null;
217
        $args = func_get_args();
218
        if (is_array($args[0])) {
219
            $args = $args[0];
220
        }
221
        foreach ($args as $number) {
222
            $number = self::convertScientificNotationToString($number);
223
            if (null === $max) {
224
                $max = $number;
225
            } else if (self::comp($max, $number) === self::COMPARE_RIGHT_GRATER) {
226
                $max = $number;
227
            }
228
        }
229
230
        return $max;
231
    }
232
233
    /**
234
     * @param string $leftOperand
@@ 258-275 (lines=18) @@
255
     * @param array|int|string,...
256
     * @return null|string
257
     */
258
    public static function min()
259
    {
260
        $min = null;
261
        $args = func_get_args();
262
        if (is_array($args[0])) {
263
            $args = $args[0];
264
        }
265
        foreach ($args as $number) {
266
            $number = self::convertScientificNotationToString($number);
267
            if (null === $min) {
268
                $min = $number;
269
            } else if (self::comp($min, $number) === self::COMPARE_LEFT_GRATER) {
270
                $min = $number;
271
            }
272
        }
273
274
        return $min;
275
    }
276
277
    /**
278
     * @param int|string $number