Code Duplication    Length = 14-14 lines in 3 locations

src/Arrayy.php 3 locations

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