NovikovViktor/RequestLimitBundle

View on GitHub

Showing 102 of 102 total issues

The variable $_memcached is not named in camelCase.
Open

    public function configure($configuration)
    {
        $memcachedHost = $configuration['server'];
        $memcachedPort = $configuration['port'];
        $_memcached = new Memcached();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_memcached is not named in camelCase.
Open

    public function configure($configuration)
    {
        $memcachedHost = $configuration['server'];
        $memcachedPort = $configuration['port'];
        $_memcached = new Memcached();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

Class extends undeclared class \Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand
Open

class MySQLProviderSetupCommand extends ContainerAwareCommand
Severity: Critical
Found in Command/MySQLProviderSetupCommand.php by phan

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

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

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 addServer from undeclared class \Memcached
Open

        $_memcached->addServer($memcachedHost, $memcachedPort);
Severity: Critical
Found in Storage/Provider/MemcachedProvider.php by phan

Call to method load from undeclared class \Symfony\Component\Config\Loader\LoaderInterface
Open

        $loader->load(__DIR__ . '/config.yml');
Severity: Critical
Found in Tests/AppKernel.php by phan

Call to undeclared method \NW\RequestLimitBundle\Tests\Unit\Utils\RestrictorTest::createMock
Open

        $storageManager = $this->createMock(
Severity: Critical
Found in Tests/Unit/Utils/RestrictorTest.php by phan

Parameter $output has undeclared type \Symfony\Component\Console\Output\OutputInterface
Open

    protected function execute(InputInterface $input, OutputInterface $output)
Severity: Minor
Found in Command/MySQLProviderSetupCommand.php by phan

Call to undeclared method \NW\RequestLimitBundle\Command\MySQLProviderSetupCommand::getContainer
Open

        $connection = $this->getContainer()->get('doctrine.orm.default_entity_manager')->getConnection();
Severity: Critical
Found in Command/MySQLProviderSetupCommand.php by phan

Call to method root from undeclared class \Symfony\Component\Config\Definition\Builder\TreeBuilder
Open

        $rootNode = $treeBuilder->root('request_limit');
Severity: Critical
Found in DependencyInjection/Configuration.php by phan

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

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

Call to method __construct from undeclared class \Memcached
Open

        $_memcached = new Memcached();
Severity: Critical
Found in Storage/Provider/MemcachedProvider.php by phan

@throws type of get has undeclared type \Doctrine\DBAL\Exception (Did you mean class \Exception)
Open

    public function get($key)
Severity: Minor
Found in Storage/Provider/MySQLProvider.php by phan

Method \NW\RequestLimitBundle\Storage\Provider\MySQLProvider::set is declared to return mixed but has no return value
Open

    public function set($key, $expiresAt)
Severity: Minor
Found in Storage/Provider/MySQLProvider.php by phan

Call to method __construct from undeclared class \Symfony\Bundle\FrameworkBundle\FrameworkBundle
Open

            $bundles[] = new Symfony\Bundle\FrameworkBundle\FrameworkBundle();
Severity: Critical
Found in Tests/AppKernel.php by phan

Call to undeclared method \NW\RequestLimitBundle\Tests\Unit\Utils\RestrictorTest::assertEquals
Open

        $this->assertEquals('userId', $result);
Severity: Critical
Found in Tests/Unit/Utils/RestrictorTest.php by phan

Parameter $input has undeclared type \Symfony\Component\Console\Input\InputInterface
Open

    protected function execute(InputInterface $input, OutputInterface $output)
Severity: Minor
Found in Command/MySQLProviderSetupCommand.php by phan

@throws type of execute has undeclared type \Doctrine\DBAL\DBALException
Open

    protected function execute(InputInterface $input, OutputInterface $output)
Severity: Minor
Found in Command/MySQLProviderSetupCommand.php by phan

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

        $providerDefinition = $container->getDefinition($providerTypeServiceName);
Severity
Category
Status
Source
Language