Code Duplication    Length = 18-18 lines in 2 locations

src/BCMathExtended/BC.php 2 locations

@@ 204-221 (lines=18) @@
201
     * @param array|int|string,...
202
     * @return null|string
203
     */
204
    public static function max()
205
    {
206
        $max = null;
207
        $args = func_get_args();
208
        if (is_array($args[0])) {
209
            $args = $args[0];
210
        }
211
        foreach ($args as $number) {
212
            $number = self::convertScientificNotationToString($number);
213
            if (null === $max) {
214
                $max = $number;
215
            } else if (self::comp($max, $number) < 0) {
216
                $max = $number;
217
            }
218
        }
219
220
        return $max;
221
    }
222
223
    /**
224
     * @param string $leftOperand
@@ 242-259 (lines=18) @@
239
     * @param array|int|string,...
240
     * @return null|string
241
     */
242
    public static function min()
243
    {
244
        $min = null;
245
        $args = func_get_args();
246
        if (is_array($args[0])) {
247
            $args = $args[0];
248
        }
249
        foreach ($args as $number) {
250
            $number = self::convertScientificNotationToString($number);
251
            if (null === $min) {
252
                $min = $number;
253
            } else if (self::comp($min, $number) > 0) {
254
                $min = $number;
255
            }
256
        }
257
258
        return $min;
259
    }
260
261
    /**
262
     * @param int|string $number