Code Duplication    Length = 11-11 lines in 2 locations

src/JArray/Javascript.php 2 locations

@@ 64-74 (lines=11) @@
61
     * @param callable $callback
62
     * @return bool
63
     */
64
    public function every(callable $callback)
65
    {
66
        $array = $this->getArrayCopy();
67
        foreach ($array as $key => $value) {
68
            if ($callback($value, $key, $array) === false) {
69
                return false;
70
            }
71
        }
72
73
        return true;
74
    }
75
76
    /**
77
     * The fill() method fills all the elements of an array from a start index to an end index with a static value.
@@ 371-381 (lines=11) @@
368
     * @param callable $callback
369
     * @return bool
370
     */
371
    public function some(callable $callback)
372
    {
373
        $array = $this->getArrayCopy();
374
        foreach ($array as $key => $value) {
375
            if ($callback($value, $key, $array) === true) {
376
                return true;
377
            }
378
        }
379
380
        return false;
381
    }
382
383
    /**
384
     * 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.