Code Duplication    Length = 14-14 lines in 3 locations

src/Arrayy.php 3 locations

@@ 599-612 (lines=14) @@
596
     * @return static
597
     *                <p>(Mutable) Return this Arrayy object.</p>
598
     */
599
    public function uasort($function): self
600
    {
601
        if (!\is_callable($function)) {
602
            throw new \InvalidArgumentException(
603
                'Passed function must be callable'
604
            );
605
        }
606
607
        $this->generatorToArray();
608
609
        \uasort($this->array, $function);
610
611
        return $this;
612
    }
613
614
    /**
615
     * Sort the entries by keys using a user-defined comparison function.
@@ 1283-1296 (lines=14) @@
1280
     * @return static
1281
     *                <p>(Mutable) Return this Arrayy object.</p>
1282
     */
1283
    public function customSortKeys($function): self
1284
    {
1285
        if (!\is_callable($function)) {
1286
            throw new \InvalidArgumentException(
1287
                'Passed function must be callable'
1288
            );
1289
        }
1290
1291
        $this->generatorToArray();
1292
1293
        \uksort($this->array, $function);
1294
1295
        return $this;
1296
    }
1297
1298
    /**
1299
     * Custom sort by value via "usort".
@@ 1310-1323 (lines=14) @@
1307
     * @return static
1308
     *                <p>(Mutable) Return this Arrayy object.</p>
1309
     */
1310
    public function customSortValues($function): self
1311
    {
1312
        if (!\is_callable($function)) {
1313
            throw new \InvalidArgumentException(
1314
                'Passed function must be callable'
1315
            );
1316
        }
1317
1318
        $this->generatorToArray();
1319
1320
        \usort($this->array, $function);
1321
1322
        return $this;
1323
    }
1324
1325
    /**
1326
     * Delete the given key or keys.