Code Duplication    Length = 18-18 lines in 2 locations

src/BCMathExtended/BC.php 2 locations

@@ 196-213 (lines=18) @@
193
     * @param array|int|string,...
194
     * @return null|string
195
     */
196
    public static function max()
197
    {
198
        $max = null;
199
        $args = func_get_args();
200
        if (is_array($args[0])) {
201
            $args = $args[0];
202
        }
203
        foreach ($args as $number) {
204
            $number = self::convertScientificNotationToString($number);
205
            if (null === $max) {
206
                $max = $number;
207
            } else if (self::comp($max, $number) < 0) {
208
                $max = $number;
209
            }
210
        }
211
212
        return $max;
213
    }
214
215
    /**
216
     * @param string $leftOperand
@@ 234-251 (lines=18) @@
231
     * @param array|int|string,...
232
     * @return null|string
233
     */
234
    public static function min()
235
    {
236
        $min = null;
237
        $args = func_get_args();
238
        if (is_array($args[0])) {
239
            $args = $args[0];
240
        }
241
        foreach ($args as $number) {
242
            $number = self::convertScientificNotationToString($number);
243
            if (null === $min) {
244
                $min = $number;
245
            } else if (self::comp($min, $number) > 0) {
246
                $min = $number;
247
            }
248
        }
249
250
        return $min;
251
    }
252
253
    /**
254
     * @param int|string $number