Code Duplication    Length = 11-11 lines in 2 locations

src/Arr/Arr.php 2 locations

@@ 189-199 (lines=11) @@
186
     * @param $startwith string
187
     * @return array
188
     */
189
    static public function filterKeyStartsWith(&$arr, $startwith)
190
    {
191
        $results = array();
192
        foreach ($arr as $key => $value) {
193
            if (Str::startsWith($key, $startwith) === true) {
194
                $results[$key] = $value;
195
            }
196
        }
197
198
        return $results;
199
    }
200
201
    /**
202
     * return an array of values filtered by the key ending with $endswith
@@ 207-217 (lines=11) @@
204
     * @param $endswith string
205
     * @return array
206
     */
207
    static public function filterKeyEndsWith(&$arr, $endswith)
208
    {
209
        $results = array();
210
        foreach ($arr as $key => $value) {
211
            if (Str::endsWith($key, $endswith) === true) {
212
                $results[$key] = $value;
213
            }
214
        }
215
216
        return $results;
217
    }
218
219
220
    /**