Showing 354 of 14,363 total issues
Method execute
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$io = new SymfonyStyle($input, $output);
$aliasId = $input->getArgument('aliasId');
$limit = 20;
- Create a ticketCreate a ticket
Method configureOptions
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(
array(
'data_class' => $this->siteClass,
- Create a ticketCreate a ticket
File RouteDocumentManagerTest.php
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace OpenOrchestra\Backoffice\Tests\Manager;
use Doctrine\Common\Collections\ArrayCollection;
- Create a ticketCreate a ticket
File NodeType.php
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace OpenOrchestra\Backoffice\Form\Type;
use OpenOrchestra\Backoffice\Context\ContextBackOfficeInterface;
- Create a ticketCreate a ticket
AbstractDataTableView
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class AbstractDataTableView extends OrchestraView
{
/**
* Constructor
*
- Create a ticketCreate a ticket
Method setUp
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setUp()
{
$this->fieldTypesConfiguration = array(
'text' =>
array(
- Create a ticketCreate a ticket
Method testConfigureOptions
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testConfigureOptions()
{
$resolverMock = Phake::mock('Symfony\Component\OptionsResolver\OptionsResolver');
$this->nodeType->configureOptions($resolverMock);
- Create a ticketCreate a ticket
Method provideStatuses
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function provideStatuses()
{
$fullStatus = $this->generateStatus(array(
'initialState' => true,
'translationState' => true,
- Create a ticketCreate a ticket
Method setUp
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setUp()
{
$context = Phake::mock('OpenOrchestra\Backoffice\Context\ContextBackOfficeInterface');
$repository = Phake::mock('OpenOrchestra\ModelInterface\Repository\NodeRepositoryInterface');
- Create a ticketCreate a ticket
Function buildView
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Open
public function buildView(FormView $view, FormInterface $form, array $options)
{
if ($form->getParent() &&
$form->getParent()->getConfig()->getType()->getName() == 'collection' &&
$form->getConfig()->getOption('columns')
- 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 validateCondition
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Open
public function validateCondition($condition)
{
$is_boolean = true;
if (!empty($condition)) {
$encapsuledElements = array();
- 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 buildForm
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
if (array_key_exists('property_path', $options) && is_null($options['property_path'])){
$builder->setData($options['prototype_data']());
}
- Create a ticketCreate a ticket
Method setUp
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setUp()
{
$this->fieldOptionClass = 'OpenOrchestra\ModelBundle\Document\FieldOption';
$this->fieldTypeClass = 'OpenOrchestra\ModelBundle\Document\FieldType';
$this->form = Phake::mock('Symfony\Component\Form\Form');
- Create a ticketCreate a ticket
Function activate
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
activate($element) {
let tags = $element.data('tags');
let prepopulatedTags = $element.val().split(' ');
let context = this;
$element.tokenInput(tags, {
- Create a ticketCreate a ticket
Function _drawGraphic
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_drawGraphic(transitions , selector) {
var g = new dagreD3.graphlib.Graph().setGraph({});
g.graph().rankdir = 'LR';
for (let transition of transitions) {
- Create a ticketCreate a ticket
Method setUp
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setUp()
{
$this->node = Phake::mock('OpenOrchestra\ModelInterface\Model\NodeInterface');
$this->area = Phake::mock('OpenOrchestra\ModelInterface\Model\AreaInterface');
$this->block = Phake::mock('OpenOrchestra\ModelInterface\Model\BlockInterface');
- Create a ticketCreate a ticket
Method addFormElements
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addFormElements(FormEvent $event)
{
$form = $event->getForm();
$data = $event->getData();
- Create a ticketCreate a ticket
Method newAction
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function newAction(Request $request, $siteId, $language, $parentId, $order)
{
$order = (int) $order;
$nodeManager = $this->get('open_orchestra_backoffice.manager.node');
$nodeRepository = $this->get('open_orchestra_model.repository.node');
- Create a ticketCreate a ticket
Method testResolver
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testResolver()
{
$this->form->configureOptions($this->resolver);
Phake::verify($this->resolver)->setDefaults(array(
'data_class' => $this->class,
- Create a ticketCreate a ticket
Method buildForm
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('siteId', 'oo_site_choice', array(
'label' => 'open_orchestra_backoffice.form.redirection.site_name',
'group_id' => 'redirection',
- Create a ticketCreate a ticket