Showing 318 of 14,363 total issues
File VideoStrategy.php
has 398 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace OpenOrchestra\Backoffice\GenerateForm\Strategies;
use OpenOrchestra\DisplayBundle\DisplayBlock\Strategies\VideoStrategy as BaseVideoStrategy;
- Create a ticketCreate a ticket
Method buildForm
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('nodeId', 'hidden', array(
'disabled' => true,
- Create a ticketCreate a ticket
Method load
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
- Create a ticketCreate a ticket
File NodeController.php
has 365 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace OpenOrchestra\ApiBundle\Controller;
use Doctrine\Common\Collections\ArrayCollection;
- Create a ticketCreate a ticket
Method addYoutubeForm
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addYoutubeForm(FormBuilderInterface $builder)
{
$builder
->add('youtubeVideoId', 'oo_video', array(
- Create a ticketCreate a ticket
Method addDailyMotionForm
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addDailyMotionForm($builder)
{
$builder
->add('dailymotionVideoId', 'oo_video', array(
'label' => 'open_orchestra_backoffice.block.video.dailymotion.video_id',
- Create a ticketCreate a ticket
Function reverseTransform
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public function reverseTransform($value)
{
$result = new ArrayCollection();
if (is_array($value)) {
foreach ($value as $type => $perimeters) {
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method provideOptions
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function provideOptions()
{
return array(
array(false, array(), array(), array(), array(), array()),
array(true, array(), array(), array(), array(), array()),
- Create a ticketCreate a ticket
Method addVimeoForm
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addVimeoForm($builder)
{
$builder
->add('vimeoVideoId', 'oo_video', array(
'label' => 'open_orchestra_backoffice.block.video.vimeo.video_id',
- Create a ticketCreate a ticket
Method testDefaultConfig
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testDefaultConfig()
{
$container = $this->loadContainerFromFile('empty');
$defaultLanguage = array(
- Create a ticketCreate a ticket
Function buildForm
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
$configuration = array();
$maxColumns = 0;
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File ContentController.php
has 304 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace OpenOrchestra\ApiBundle\Controller;
use OpenOrchestra\ApiBundle\Controller\ControllerTrait\ListStatus;
- Create a ticketCreate a ticket
Function execute
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$io = new SymfonyStyle($input, $output);
$aliasId = $input->getArgument('aliasId');
$limit = 20;
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method addTemplateSetConfiguration
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addTemplateSetConfiguration()
{
$builder = new TreeBuilder();
$templateSet = $builder->root('template_set');
- Create a ticketCreate a ticket
File Configuration.php
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace OpenOrchestra\BackofficeBundle\DependencyInjection;
use OpenOrchestra\ModelInterface\Model\ContentInterface;
- Create a ticketCreate a ticket
Method buildForm
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('names', 'oo_multi_languages', array(
'label' => 'open_orchestra_backoffice.form.content_type.names',
- Create a ticketCreate a ticket
Method buildForm
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('scheme', 'choice', array(
'choices' => $this->schemeChoices,
- Create a ticketCreate a ticket
Method buildForm
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
$sitesId = array();
$disabled = false;
if (array_key_exists('data', $options) && ($user = $options['data']) instanceof UserInterface) {
- Create a ticketCreate a ticket
Function findUsageReferenceInOtherSite
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function findUsageReferenceInOtherSite($siteId, $entities)
{
$usedOtherSite = array();
$supportedEntities = array(BlockInterface::ENTITY_TYPE, ContentInterface::ENTITY_TYPE);
/** @var UseTrackableInterface $entity */
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function reverseTransform
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function reverseTransform($value)
{
$result = new ArrayCollection();
if (is_array($value)) {
foreach ($value as $key => $profiles) {
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"