BackofficeBundle/Tests/DependencyInjection/OpenOrchestraBackofficeExtensionTest.php
Method testDefaultConfig
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testDefaultConfig()
{
$container = $this->loadContainerFromFile('empty');
$defaultLanguage = array(
- Create a ticketCreate a ticket
The method testDefaultConfig() has 103 lines of code. Current threshold is set to 100. Avoid really long methods. Open
Open
public function testDefaultConfig()
{
$container = $this->loadContainerFromFile('empty');
$defaultLanguage = array(
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$this->assertEquals($defaultLanguage, $container->getParameter('open_orchestra_backoffice.orchestra_choice.front_language'));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtensionTest::assertCount
Open
Open
$this->assertCount(11, $fields);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtensionTest::assertEquals
Open
Open
$this->assertEquals($fixedAttributes, $container->getParameter('open_orchestra_backoffice.block.fixed_attributes'));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtensionTest::assertEquals
Open
Open
$this->assertEquals($configurationRoles, $container->getParameter('open_orchestra_backoffice.configuration.roles'));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtensionTest::assertArrayHasKey
Open
Open
$this->assertArrayHasKey('fake_field', $fields);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NAME
from undeclared class \OpenOrchestra\DisplayBundle\DisplayBlock\Strategies\ContentStrategy
(Did you mean class \OpenOrchestra\Backoffice\BusinessRules\Strategies\ContentStrategy or class \OpenOrchestra\Backoffice\GenerateForm\Strategies\ContentStrategy) Open
Open
ContentStrategy::NAME,
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtensionTest::assertEquals
Open
Open
$this->assertEquals($choice_frequence, $container->getParameter('open_orchestra_backoffice.choice.frequence'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$this->assertEquals($defaultLanguage, $container->getParameter('open_orchestra_backoffice.orchestra_choice.front_language'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$fields = $container->getParameter('open_orchestra_backoffice.field_types');
- Create a ticketCreate a ticket
- Exclude checks
Return type of loadContainerFromFile()
is undeclared type \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
private function loadContainerFromFile($file)
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container = new ContainerBuilder();
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open
Open
class OpenOrchestraBackofficeExtensionTest extends AbstractBaseTestCase
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NAME
from undeclared class \OpenOrchestra\DisplayBundle\DisplayBlock\Strategies\ContentListStrategy
(Did you mean class \OpenOrchestra\Backoffice\GenerateForm\Strategies\ContentListStrategy) Open
Open
ContentListStrategy::NAME,
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NAME
from undeclared class \OpenOrchestra\DisplayBundle\DisplayBlock\Strategies\VideoStrategy
(Did you mean class \OpenOrchestra\Backoffice\GenerateForm\Strategies\VideoStrategy) Open
Open
VideoStrategy::NAME,
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NAME
from undeclared class \OpenOrchestra\DisplayBundle\DisplayBlock\Strategies\ContactStrategy
(Did you mean class \OpenOrchestra\Backoffice\GenerateForm\Strategies\ContactStrategy) Open
Open
ContactStrategy::NAME,
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtensionTest::assertEquals
Open
Open
$this->assertEquals($defaultLanguage, $container->getParameter('open_orchestra_backoffice.orchestra_choice.front_language'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$this->assertEquals($fixedAttributes, $container->getParameter('open_orchestra_backoffice.block.fixed_attributes'));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtensionTest::assertCount
Open
Open
$this->assertCount(15, $options);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtensionTest::assertArrayHasKey
Open
Open
$this->assertArrayHasKey('fake_option', $options);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('kernel.environment', 'prod');
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$this->assertEquals('OpenOrchestraBackofficeBundle::form.html.twig', $container->getParameter('open_orchestra_user.form_template'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$this->assertEquals($fixedAttributes, $container->getParameter('open_orchestra_backoffice.block.fixed_attributes'));
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NAME
from undeclared class \OpenOrchestra\DisplayBundle\DisplayBlock\Strategies\ConfigurableContentStrategy
(Did you mean class \OpenOrchestra\Backoffice\GenerateForm\Strategies\ConfigurableContentStrategy) Open
Open
ConfigurableContentStrategy::NAME,
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtensionTest::assertEquals
Open
Open
$this->assertEquals($blocks, $container->getParameter('open_orchestra.blocks'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('kernel.debug', false);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$this->assertEquals($choice_frequence, $container->getParameter('open_orchestra_backoffice.choice.frequence'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method compile
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->compile();
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtensionTest::assertEquals
Open
Open
$this->assertEquals($fixedAttributes, $container->getParameter('open_orchestra_backoffice.block.fixed_attributes'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$this->assertEquals($configurationRoles, $container->getParameter('open_orchestra_backoffice.configuration.roles'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$this->assertEquals($this->defaultBlocks, $container->getParameter('open_orchestra.blocks'));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtensionTest::assertEquals
Open
Open
$this->assertEquals($defaultLanguage, $container->getParameter('open_orchestra_backoffice.orchestra_choice.front_language'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load($file . '.yml');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtensionTest::assertEquals
Open
Open
$this->assertEquals($this->defaultBlocks, $container->getParameter('open_orchestra.blocks'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method getCompilerPassConfig
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->getCompilerPassConfig()->setRemovingPasses(array());
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$this->assertEquals('OpenOrchestraBackofficeBundle::layout.html.twig', $container->getParameter('open_orchestra_user.base_layout'));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtensionTest::assertEquals
Open
Open
$this->assertEquals('OpenOrchestraBackofficeBundle::layout.html.twig', $container->getParameter('open_orchestra_user.base_layout'));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtensionTest::assertEquals
Open
Open
$this->assertEquals('OpenOrchestraBackofficeBundle::form.html.twig', $container->getParameter('open_orchestra_user.form_template'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$options = $container->getParameter('open_orchestra_backoffice.options');
- Create a ticketCreate a ticket
- Exclude checks
Call to method getCompilerPassConfig
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->getCompilerPassConfig()->setOptimizationPasses(array());
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NAME
from undeclared class \OpenOrchestra\DisplayBundle\DisplayBlock\Strategies\TinyMCEWysiwygStrategy
(Did you mean class \OpenOrchestra\Backoffice\DisplayBlock\Strategies\TinyMCEWysiwygStrategy or class \OpenOrchestra\Backoffice\GenerateForm\Strategies\TinyMCEWysiwygStrategy) Open
Open
TinyMCEWysiwygStrategy::NAME,
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('kernel.cache_dir', '/tmp');
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \Symfony\Component\Config\FileLocator
Open
Open
$locator = new FileLocator(__DIR__ . '/Fixtures/config/');
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader = new YamlFileLoader($container, $locator);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$this->assertEquals($blocks, $container->getParameter('open_orchestra.blocks'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method registerExtension
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->registerExtension(new OpenOrchestraBackofficeExtension());
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
Open
$this->assertEquals($configurationRoles, $container->getParameter('open_orchestra_backoffice.configuration.roles'));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
Open
$this->assertEquals($fixedAttributes, $container->getParameter('open_orchestra_backoffice.block.fixed_attributes'));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
Open
$this->assertEquals($fixedAttributes, $container->getParameter('open_orchestra_backoffice.block.fixed_attributes'));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 140 characters Open
Open
$this->assertEquals('OpenOrchestraBackofficeBundle::layout.html.twig', $container->getParameter('open_orchestra_user.base_layout'));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 140 characters Open
Open
$this->assertEquals('OpenOrchestraBackofficeBundle::form.html.twig', $container->getParameter('open_orchestra_user.form_template'));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
Open
$this->assertEquals($defaultLanguage, $container->getParameter('open_orchestra_backoffice.orchestra_choice.front_language'));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
Open
$this->assertEquals($defaultLanguage, $container->getParameter('open_orchestra_backoffice.orchestra_choice.front_language'));
- Create a ticketCreate a ticket
- Exclude checks
Closing brace indented incorrectly; expected 4 spaces, found 3 Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 3 Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
The variable $choice_frequence is not named in camelCase. Open
Open
public function testDefaultConfig()
{
$container = $this->loadContainerFromFile('empty');
$defaultLanguage = array(
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 $choice_frequence is not named in camelCase. Open
Open
public function testDefaultConfig()
{
$container = $this->loadContainerFromFile('empty');
$defaultLanguage = array(
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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();
}
}