digipolisgent/robo-digipolis-drupal8

View on GitHub
src/EventHandler/ClearCacheHandler.php

Summary

Maintainability
A
1 hr
Test Coverage

Method handle has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function handle(GenericEvent $event)
    {
        /** @var RemoteConfig $remoteConfig */
        $remoteConfig = $event->getArgument('remoteConfig');
        $remoteSettings = $remoteConfig->getRemoteSettings();
Severity: Minor
Found in src/EventHandler/ClearCacheHandler.php - About 1 hr to fix

    Avoid unused local variables such as '$currentWebRoot'.
    Open

            $currentProjectRoot = $currentWebRoot = $remoteSettings['currentdir'] . '/..';

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    There are no issues that match your filters.

    Category
    Status