Code Duplication    Length = 8-8 lines in 4 locations

src/AppBundle/Twig/AppExtension.php 4 locations

@@ 263-270 (lines=8) @@
260
     * @param string $tool The short name of the tool.
261
     * @return bool
262
     */
263
    public function tabEnabled($tool = "index")
264
    {
265
        $param = false;
266
        if ($this->container->hasParameter("enable.$tool")) {
267
            $param = boolval($this->container->getParameter("enable.$tool"));
268
        }
269
        return $param;
270
    }
271
272
    /**
273
     * Get a list of the short names of all tools.
@@ 417-424 (lines=8) @@
414
     * Whether XTools is running in single-project mode.
415
     * @return bool
416
     */
417
    public function isSingleWiki()
418
    {
419
        $param = true;
420
        if ($this->container->hasParameter('app.single_wiki')) {
421
            $param = boolval($this->container->getParameter('app.single_wiki'));
422
        }
423
        return $param;
424
    }
425
426
    /**
427
     * Get the database replication-lag threshold.
@@ 443-450 (lines=8) @@
440
     * Whether we should load stylesheets from external CDNs or not.
441
     * @return bool
442
     */
443
    public function loadStylesheetsFromCDN()
444
    {
445
        $param = false;
446
        if ($this->container->hasParameter('app.load_stylesheets_from_cdn')) {
447
            $param = boolval($this->container->getParameter('app.load_stylesheets_from_cdn'));
448
        }
449
        return $param;
450
    }
451
452
    /**
453
     * Whether XTools is running in WMF Labs mode.
@@ 456-463 (lines=8) @@
453
     * Whether XTools is running in WMF Labs mode.
454
     * @return bool
455
     */
456
    public function isWMFLabs()
457
    {
458
        $param = false;
459
        if ($this->container->hasParameter('app.is_labs')) {
460
            $param = boolval($this->container->getParameter('app.is_labs'));
461
        }
462
        return $param;
463
    }
464
465
    /**
466
     * The current replication lag.