Code Duplication    Length = 12-12 lines in 3 locations

src/Arrayy.php 3 locations

@@ 544-555 (lines=12) @@
541
     * @return static
542
     *                <p>(Mutable) Return this Arrayy object.</p>
543
     */
544
    public function uasort($function)
545
    {
546
        if (!\is_callable($function)) {
547
            throw new \InvalidArgumentException(
548
                'Passed function must be callable'
549
            );
550
        }
551
552
        \uasort($this->array, $function);
553
554
        return $this;
555
    }
556
557
    /**
558
     * Sort the entries by keys using a user-defined comparison function.
@@ 1183-1194 (lines=12) @@
1180
     * @return static
1181
     *                <p>(Mutable) Return this Arrayy object.</p>
1182
     */
1183
    public function customSortKeys($function)
1184
    {
1185
        if (!\is_callable($function)) {
1186
            throw new \InvalidArgumentException(
1187
                'Passed function must be callable'
1188
            );
1189
        }
1190
1191
        \uksort($this->array, $function);
1192
1193
        return $this;
1194
    }
1195
1196
    /**
1197
     * Custom sort by value via "usort".
@@ 1208-1219 (lines=12) @@
1205
     * @return static
1206
     *                <p>(Mutable) Return this Arrayy object.</p>
1207
     */
1208
    public function customSortValues($function)
1209
    {
1210
        if (!\is_callable($function)) {
1211
            throw new \InvalidArgumentException(
1212
                'Passed function must be callable'
1213
            );
1214
        }
1215
1216
        \usort($this->array, $function);
1217
1218
        return $this;
1219
    }
1220
1221
    /**
1222
     * Return values that are only in the current array.