NovikovViktor/RequestLimitBundle

View on GitHub
DependencyInjection/NWRequestLimitExtension.php

Summary

Maintainability
A
0 mins
Test Coverage

Call to method setParameter from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open

        $container->setParameter('nw_request_limit.restriction_time', $restrictionTime);

Call to method setParameter from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open

        $container->setParameter('nw_request_limit.provider_type', $providerType);

Call to method __construct from undeclared class \Symfony\Component\DependencyInjection\Loader\XmlFileLoader
Open

        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));

Call to method load from undeclared class \Symfony\Component\DependencyInjection\Loader\XmlFileLoader
Open

        $loader->load('services.xml');

Call to undeclared method \NW\RequestLimitBundle\DependencyInjection\NWRequestLimitExtension::processConfiguration
Open

        $config = $this->processConfiguration($configuration, $configs);

Parameter $container has undeclared type \Symfony\Component\DependencyInjection\ContainerBuilder
Open

    public function load(array $configs, ContainerBuilder $container)

Call to method setParameter from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open

        $container->setParameter('nw_request_limit.provider_configuration', $providerConfiguration);

Class extends undeclared class \Symfony\Component\HttpKernel\DependencyInjection\Extension
Open

class NWRequestLimitExtension extends Extension

Call to method __construct from undeclared class \Symfony\Component\Config\FileLocator
Open

        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));

Avoid excessively long variable names like $providerConfiguration. Keep variable name length under 20.
Open

        $providerConfiguration = $config['provider_configuration'];

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

There are no issues that match your filters.

Category
Status