Showing 318 of 14,363 total issues
Method buildForm
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name', 'text', array(
'label' => 'open_orchestra_backoffice.form.website.name',
- Create a ticketCreate a ticket
Method getBadRoles
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getBadRoles()
{
$keyword = $this->createPhakeKeyword();
return array(
- Create a ticketCreate a ticket
ContextManagerTest
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class ContextManagerTest extends AbstractBaseTestCase
{
/**
* @var ContextManager
*/
- Create a ticketCreate a ticket
Method getConfigTreeBuilder
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('open_orchestra_backoffice');
- 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
ContextBackOfficeManagerTest
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class ContextBackOfficeManagerTest extends AbstractBaseTestCase
{
/**
* @var ContextBackOfficeManager
*/
- Create a ticketCreate a ticket
AbstractVoterTest
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
abstract class AbstractVoterTest extends AbstractBaseTestCase
{
protected $voter;
protected $perimeterManager;
- Create a ticketCreate a ticket
Method testConfigureOptions
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testConfigureOptions()
{
$resolver = Phake::mock('Symfony\Component\OptionsResolver\OptionsResolver');
$this->form->configureOptions($resolver);
- Create a ticketCreate a ticket
File symlink.js
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
module.exports = {
//--[ FONT MONTSERRAT ]--//
font_montserrat_700_eot: {
src: 'web/bundles/openorchestrabackoffice/font/Montserrat/fonts/Montserrat-700/Montserrat-700.eot',
dest: 'web/fonts/Montserrat-700/Montserrat-700.eot'
- Create a ticketCreate a ticket
Method configureOptions
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function configureOptions(OptionsResolver $resolver)
{
$subGroupRender = array(
'properties' => array(
'rank' => 0,
- Create a ticketCreate a ticket
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"