Code Duplication    Length = 11-11 lines in 2 locations

src/JArray/Javascript.php 2 locations

@@ 54-64 (lines=11) @@
51
     * @param callable $callback
52
     * @return bool
53
     */
54
    public function every(callable $callback)
55
    {
56
        $array = $this->getArrayCopy();
57
        foreach ($array as $key => $value) {
58
            if ($callback($value, $key, $array) === false) {
59
                return false;
60
            }
61
        }
62
63
        return true;
64
    }
65
66
    /**
67
     * The fill() method fills all the elements of an array from a start index to an end index with a static value.
@@ 361-371 (lines=11) @@
358
     * @param callable $callback
359
     * @return bool
360
     */
361
    public function some(callable $callback)
362
    {
363
        $array = $this->getArrayCopy();
364
        foreach ($array as $key => $value) {
365
            if ($callback($value, $key, $array) === true) {
366
                return true;
367
            }
368
        }
369
370
        return false;
371
    }
372
373
    /**
374
     * The sort() method sorts the elements of an array in place and returns the array. The sort is not necessarily stable. The default sort order is according to string Unicode code points.