Code Duplication    Length = 8-8 lines in 4 locations

src/AppBundle/Twig/AppExtension.php 4 locations

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