Code Duplication    Length = 16-16 lines in 2 locations

src/Installer/ModuleFileInstallerManager.php 2 locations

@@ 261-276 (lines=16) @@
258
    /**
259
     * {@inheritdoc}
260
     */
261
    public function hasRootInstallerDescriptors(Expression $expr = null)
262
    {
263
        $this->assertInstallersLoaded();
264
265
        if (!$expr) {
266
            return count($this->rootInstallerDescriptors) > 0;
267
        }
268
269
        foreach ($this->rootInstallerDescriptors as $installer) {
270
            if ($expr->evaluate($installer)) {
271
                return true;
272
            }
273
        }
274
275
        return false;
276
    }
277
278
    /**
279
     * {@inheritdoc}
@@ 333-348 (lines=16) @@
330
    /**
331
     * {@inheritdoc}
332
     */
333
    public function hasInstallerDescriptors(Expression $expr = null)
334
    {
335
        $this->assertInstallersLoaded();
336
337
        if (!$expr) {
338
            return count($this->installerDescriptors) > 0;
339
        }
340
341
        foreach ($this->installerDescriptors as $installer) {
342
            if ($expr->evaluate($installer)) {
343
                return true;
344
            }
345
        }
346
347
        return false;
348
    }
349
350
    private function assertInstallersLoaded()
351
    {