Code Duplication    Length = 12-12 lines in 3 locations

src/Arrayy.php 3 locations

@@ 541-552 (lines=12) @@
538
     * @return static
539
     *                <p>(Mutable) Return this Arrayy object.</p>
540
     */
541
    public function uasort($function)
542
    {
543
        if (!\is_callable($function)) {
544
            throw new \InvalidArgumentException(
545
                'Passed function must be callable'
546
            );
547
        }
548
549
        \uasort($this->array, $function);
550
551
        return $this;
552
    }
553
554
    /**
555
     * Sort the entries by keys using a user-defined comparison function.
@@ 1284-1295 (lines=12) @@
1281
     * @return static
1282
     *                 <p>(Mutable) Return this Arrayy object.</p>
1283
     */
1284
    public function customSortKeys($function)
1285
    {
1286
        if (!\is_callable($function)) {
1287
            throw new \InvalidArgumentException(
1288
                'Passed function must be callable'
1289
            );
1290
        }
1291
1292
        \uksort($this->array, $function);
1293
1294
        return $this;
1295
    }
1296
1297
    /**
1298
     * Custom sort by value via "usort".
@@ 1309-1320 (lines=12) @@
1306
     * @return static
1307
     *                 <p>(Mutable) Return this Arrayy object.</p>
1308
     */
1309
    public function customSortValues($function)
1310
    {
1311
        if (!\is_callable($function)) {
1312
            throw new \InvalidArgumentException(
1313
                'Passed function must be callable'
1314
            );
1315
        }
1316
1317
        \usort($this->array, $function);
1318
1319
        return $this;
1320
    }
1321
1322
    /**
1323
     * Return values that are only in the current array.