Code Duplication    Length = 14-14 lines in 3 locations

src/Arrayy.php 3 locations

@@ 605-618 (lines=14) @@
602
     * @return static
603
     *                <p>(Mutable) Return this Arrayy object.</p>
604
     */
605
    public function uasort($function): self
606
    {
607
        if (!\is_callable($function)) {
608
            throw new \InvalidArgumentException(
609
                'Passed function must be callable'
610
            );
611
        }
612
613
        $this->generatorToArray();
614
615
        \uasort($this->array, $function);
616
617
        return $this;
618
    }
619
620
    /**
621
     * Sort the entries by keys using a user-defined comparison function.
@@ 1280-1293 (lines=14) @@
1277
     * @return static
1278
     *                <p>(Mutable) Return this Arrayy object.</p>
1279
     */
1280
    public function customSortKeys($function): self
1281
    {
1282
        if (!\is_callable($function)) {
1283
            throw new \InvalidArgumentException(
1284
                'Passed function must be callable'
1285
            );
1286
        }
1287
1288
        $this->generatorToArray();
1289
1290
        \uksort($this->array, $function);
1291
1292
        return $this;
1293
    }
1294
1295
    /**
1296
     * Custom sort by value via "usort".
@@ 1307-1320 (lines=14) @@
1304
     * @return static
1305
     *                <p>(Mutable) Return this Arrayy object.</p>
1306
     */
1307
    public function customSortValues($function): self
1308
    {
1309
        if (!\is_callable($function)) {
1310
            throw new \InvalidArgumentException(
1311
                'Passed function must be callable'
1312
            );
1313
        }
1314
1315
        $this->generatorToArray();
1316
1317
        \usort($this->array, $function);
1318
1319
        return $this;
1320
    }
1321
1322
    /**
1323
     * Return values that are only in the current array.