Code Duplication    Length = 10-12 lines in 2 locations

src/JsonDiscovery.php 1 location

@@ 349-358 (lines=10) @@
346
347
        $this->loadAllBindings();
348
349
        foreach ($this->bindingsByKey as $key => $bindingsForKey) {
350
            foreach ($bindingsForKey as $i => $binding) {
351
                if ($expr->evaluate($binding)) {
352
                    unset($this->bindingsByKey[$key][$i]);
353
                }
354
            }
355
356
            $this->reindexBindingsForKey($key);
357
            $this->syncBindingsForKey($key);
358
        }
359
360
        $this->flush();
361
    }

src/KeyValueStoreDiscovery.php 1 location

@@ 309-320 (lines=12) @@
306
    {
307
        $this->loadAllBindings();
308
309
        foreach ($this->bindingsByKey as $key => $bindingsForKey) {
310
            foreach ($bindingsForKey as $i => $binding) {
311
                if ($expr->evaluate($binding)) {
312
                    unset($this->bindingsByKey[$key][$i]);
313
                }
314
            }
315
316
            // Reindex array
317
            $this->reindexBindingsForKey($key);
318
319
            $this->syncBindingsForKey($key);
320
        }
321
    }
322
323
    /**