Code Duplication    Length = 8-8 lines in 4 locations

src/AppBundle/Twig/AppExtension.php 4 locations

@@ 240-247 (lines=8) @@
237
     * @param string $tool The short name of the tool.
238
     * @return bool
239
     */
240
    public function tabEnabled($tool = "index")
241
    {
242
        $param = false;
243
        if ($this->container->hasParameter("enable.$tool")) {
244
            $param = boolval($this->container->getParameter("enable.$tool"));
245
        }
246
        return $param;
247
    }
248
249
    /**
250
     * Get a list of the short names of all tools.
@@ 394-401 (lines=8) @@
391
     * Whether XTools is running in single-project mode.
392
     * @return bool
393
     */
394
    public function isSingleWiki()
395
    {
396
        $param = true;
397
        if ($this->container->hasParameter('app.single_wiki')) {
398
            $param = boolval($this->container->getParameter('app.single_wiki'));
399
        }
400
        return $param;
401
    }
402
403
    /**
404
     * Get the database replication-lag threshold.
@@ 420-427 (lines=8) @@
417
     * Whether we should load stylesheets from external CDNs or not.
418
     * @return bool
419
     */
420
    public function loadStylesheetsFromCDN()
421
    {
422
        $param = false;
423
        if ($this->container->hasParameter('app.load_stylesheets_from_cdn')) {
424
            $param = boolval($this->container->getParameter('app.load_stylesheets_from_cdn'));
425
        }
426
        return $param;
427
    }
428
429
    /**
430
     * Whether XTools is running in WMF Labs mode.
@@ 433-440 (lines=8) @@
430
     * Whether XTools is running in WMF Labs mode.
431
     * @return bool
432
     */
433
    public function isWMFLabs()
434
    {
435
        $param = false;
436
        if ($this->container->hasParameter('app.is_labs')) {
437
            $param = boolval($this->container->getParameter('app.is_labs'));
438
        }
439
        return $param;
440
    }
441
442
    /**
443
     * The current replication lag.