BackofficeBundle/DependencyInjection/OpenOrchestraBackofficeExtension.php
Method load
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
- Create a ticketCreate a ticket
Method updateBlockConfiguration
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function updateBlockConfiguration(ContainerBuilder $container, array $config)
{
$backOfficeBlockConfiguration = array(
FooterStrategy::NAME => array(
'category' => 'open_orchestra_backoffice.block_configuration.category.navigation',
- Create a ticketCreate a ticket
The method load() has 136 lines of code. Current threshold is set to 100. Avoid really long methods. Open
Open
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
- Create a ticketCreate a ticket
- Exclude checks
The class OpenOrchestraBackofficeExtension has a coupling between objects value of 16. Consider to reduce the number of dependencies under 13. Open
Open
class OpenOrchestraBackofficeExtension extends Extension
{
/**
* {@inheritDoc}
*/
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CouplingBetweenObjects
Since: 1.1.0
A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability
Example
class Foo {
/**
* @var \foo\bar\X
*/
private $x = null;
/**
* @var \foo\bar\Y
*/
private $y = null;
/**
* @var \foo\bar\Z
*/
private $z = null;
public function setFoo(\Foo $foo) {}
public function setBar(\Bar $bar) {}
public function setBaz(\Baz $baz) {}
/**
* @return \SplObjectStorage
* @throws \OutOfRangeException
* @throws \InvalidArgumentException
* @throws \ErrorException
*/
public function process(\Iterator $it) {}
// ...
}
Source https://phpmd.org/rules/design.html#couplingbetweenobjects
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
if ('test' == $container->getParameter('kernel.environment')) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra.blocks', $blocks);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NAME
from undeclared class \OpenOrchestra\DisplayBundle\DisplayBlock\Strategies\MenuStrategy
(Did you mean class \OpenOrchestra\Backoffice\GenerateForm\Strategies\MenuStrategy) Open
Open
MenuStrategy::NAME => array(
- 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 => array(
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra_backoffice.trash_item_type', $config['trash_item_type']);
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('manager.yml');
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('trashcan_entity.yml');
- 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
Parameter $container
has undeclared type \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
protected function addApplicationFieldTypes($appFieldTypes, ContainerBuilder $container)
- 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 => array(
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$blockConfiguration = $container->getParameter('open_orchestra_backoffice.block_configuration');
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \Symfony\Component\Config\FileLocator
Open
Open
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('voter.yml');
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('auto_publisher.yml');
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('util.yml');
- 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 hasParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
if ($container->hasParameter('open_orchestra.blocks')) {
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NAME
from undeclared class \OpenOrchestra\DisplayBundle\DisplayBlock\Strategies\AudienceAnalysisStrategy
(Did you mean class \OpenOrchestra\Backoffice\GenerateForm\Strategies\AudienceAnalysisStrategy) Open
Open
AudienceAnalysisStrategy::NAME => array(
- 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 method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra_backoffice.field_types', $fieldTypes);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra_backoffice.template_set', $config['template_set']);
- 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 => array(
- Create a ticketCreate a ticket
- Exclude checks
Parameter $container
has undeclared type \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
public function load(array $configs, ContainerBuilder $container)
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('generator.yml');
- 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
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra_user.base_layout', 'OpenOrchestraBackofficeBundle::layout.html.twig');
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra_backoffice.configuration.front_roles', $configurationFrontRoles);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra_backoffice.disallowed_field_names', $disallowedFieldNames);
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('field_type.yml');
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('transformer.yml');
- 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 method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->getParameter('open_orchestra_backoffice.field_types'),
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NAME
from undeclared class \OpenOrchestra\DisplayBundle\DisplayBlock\Strategies\LanguageListStrategy
(Did you mean class \OpenOrchestra\Backoffice\GenerateForm\Strategies\LanguageListStrategy) Open
Open
LanguageListStrategy::NAME => array(
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra_user.form_template', 'OpenOrchestraBackofficeBundle::form.html.twig');
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('business_rules.yml');
- Create a ticketCreate a ticket
- Exclude checks
Parameter $container
has undeclared type \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
protected function updateBlockConfiguration(ContainerBuilder $container, array $config)
- Create a ticketCreate a ticket
- Exclude checks
Call to method hasParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
if ($container->hasParameter('open_orchestra_backoffice.block_configuration')) {
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \Symfony\Component\HttpKernel\DependencyInjection\Extension
Open
Open
class OpenOrchestraBackofficeExtension extends Extension
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('parameters.yml');
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra_backoffice.block.fixed_attributes', $config['fixed_attributes']);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra_backoffice.configuration.roles', $configurationRoles);
- Create a ticketCreate a ticket
- Exclude checks
Call to method hasParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
if ($container->hasParameter('disallowed_field_names')) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('form.yml');
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra_backoffice.orchestra_choice.front_language', $config['front_languages']);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->getParameter('disallowed_field_names')
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('listener.yml');
- 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\SubMenuStrategy
(Did you mean class \OpenOrchestra\Backoffice\GenerateForm\Strategies\SubMenuStrategy) Open
Open
SubMenuStrategy::NAME => array(
- 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 => array(
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('usage_finder.yml');
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('test_services.yml');
- Create a ticketCreate a ticket
- Exclude checks
Parameter $container
has undeclared type \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
protected function updateBlockParameter(ContainerBuilder $container, $config)
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NAME
from undeclared class \OpenOrchestra\DisplayBundle\DisplayBlock\Strategies\FooterStrategy
(Did you mean class \OpenOrchestra\Backoffice\GenerateForm\Strategies\FooterStrategy) Open
Open
FooterStrategy::NAME => array(
- 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 => array(
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\DependencyInjection\OpenOrchestraBackofficeExtension::processConfiguration
Open
Open
$config = $this->processConfiguration($configuration, $configs);
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('group.yml');
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('reference.yml');
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$blocksAlreadySet = $container->getParameter('open_orchestra.blocks');
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra_backoffice.special_page_name', $config['special_page_name']);
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('display.yml');
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('value_transformer.yml');
- Create a ticketCreate a ticket
- Exclude checks
Parameter $container
has undeclared type \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
protected function addApplicationOptions($appOptions, ContainerBuilder $container)
- 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 => array(
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra_backoffice.block_configuration', $blockConfiguration);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra_backoffice.block_default_configuration', $config['block_default_configuration']);
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('subscriber.yml');
- Create a ticketCreate a ticket
- Exclude checks
Call to method getParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->getParameter('open_orchestra_backoffice.options'),
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParameter
from undeclared class \Symfony\Component\DependencyInjection\ContainerBuilder
Open
Open
$container->setParameter('open_orchestra_backoffice.options', $options);
- Create a ticketCreate a ticket
- Exclude checks
Call to method load
from undeclared class \Symfony\Component\DependencyInjection\Loader\YamlFileLoader
Open
Open
$loader->load('validator.yml');
- Create a ticketCreate a ticket
- Exclude checks
Avoid excessively long variable names like $configurationFrontRoles. Keep variable name length under 20. Open
Open
$configurationFrontRoles = $config['front_roles'];
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Avoid excessively long variable names like $backOfficeBlockConfiguration. Keep variable name length under 20. Open
Open
$backOfficeBlockConfiguration = array(
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Line exceeds 120 characters; contains 122 characters Open
Open
$container->setParameter('open_orchestra_backoffice.orchestra_choice.front_language', $config['front_languages']);
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 164 characters Open
Open
$configurationRoles = array_merge_recursive($configurationRoles, array('open_orchestra_backoffice.role.front_access' => array('fourthpackage' => $result)));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
Open
$container->setParameter('open_orchestra_backoffice.block_default_configuration', $config['block_default_configuration']);
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 126 characters Open
Open
$blockConfiguration = array_merge($config['block_configuration'], $blockConfiguration, $backOfficeBlockConfiguration);
- Create a ticketCreate a ticket
- Exclude checks