Code Duplication    Length = 14-14 lines in 3 locations

src/Arrayy.php 3 locations

@@ 576-589 (lines=14) @@
573
     * @return static
574
     *                <p>(Mutable) Return this Arrayy object.</p>
575
     */
576
    public function uasort($function): self
577
    {
578
        if (!\is_callable($function)) {
579
            throw new \InvalidArgumentException(
580
                'Passed function must be callable'
581
            );
582
        }
583
584
        $this->generatorToArray();
585
586
        \uasort($this->array, $function);
587
588
        return $this;
589
    }
590
591
    /**
592
     * Sort the entries by keys using a user-defined comparison function.
@@ 1240-1253 (lines=14) @@
1237
     * @return static
1238
     *                <p>(Mutable) Return this Arrayy object.</p>
1239
     */
1240
    public function customSortKeys($function): self
1241
    {
1242
        if (!\is_callable($function)) {
1243
            throw new \InvalidArgumentException(
1244
                'Passed function must be callable'
1245
            );
1246
        }
1247
1248
        $this->generatorToArray();
1249
1250
        \uksort($this->array, $function);
1251
1252
        return $this;
1253
    }
1254
1255
    /**
1256
     * Custom sort by value via "usort".
@@ 1267-1280 (lines=14) @@
1264
     * @return static
1265
     *                <p>(Mutable) Return this Arrayy object.</p>
1266
     */
1267
    public function customSortValues($function): self
1268
    {
1269
        if (!\is_callable($function)) {
1270
            throw new \InvalidArgumentException(
1271
                'Passed function must be callable'
1272
            );
1273
        }
1274
1275
        $this->generatorToArray();
1276
1277
        \usort($this->array, $function);
1278
1279
        return $this;
1280
    }
1281
1282
    /**
1283
     * Return values that are only in the current array.