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.
@@ 1288-1301 (lines=14) @@
1285
     * @return static
1286
     *                <p>(Mutable) Return this Arrayy object.</p>
1287
     */
1288
    public function customSortKeys($function): self
1289
    {
1290
        if (!\is_callable($function)) {
1291
            throw new \InvalidArgumentException(
1292
                'Passed function must be callable'
1293
            );
1294
        }
1295
1296
        $this->generatorToArray();
1297
1298
        \uksort($this->array, $function);
1299
1300
        return $this;
1301
    }
1302
1303
    /**
1304
     * Custom sort by value via "usort".
@@ 1315-1328 (lines=14) @@
1312
     * @return static
1313
     *                <p>(Mutable) Return this Arrayy object.</p>
1314
     */
1315
    public function customSortValues($function): self
1316
    {
1317
        if (!\is_callable($function)) {
1318
            throw new \InvalidArgumentException(
1319
                'Passed function must be callable'
1320
            );
1321
        }
1322
1323
        $this->generatorToArray();
1324
1325
        \usort($this->array, $function);
1326
1327
        return $this;
1328
    }
1329
1330
    /**
1331
     * Return values that are only in the current array.