Showing 318 of 14,363 total issues
Method setUp
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setUp()
{
$contentType = 'fakeContentType';
$choiceType = 'fakeChoiceType';
$language = 'fakeLanguage';
- Create a ticketCreate a ticket
Method addFieldTypesParameter
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addFieldTypesParameter()
{
$builder = new TreeBuilder();
$fieldTypes = $builder->root('field_types');
- Create a ticketCreate a ticket
Method configureOptions
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(
array(
'data_class' => $this->siteAliasClass,
- Create a ticketCreate a ticket
Method configureOptions
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(
array(
'data_class' => $this->groupClass,
- Create a ticketCreate a ticket
Method __construct
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
NodeRepositoryInterface $nodeRepository,
SiteRepositoryInterface $siteRepository,
StatusRepositoryInterface $statusRepository,
BlockRepositoryInterface $blockRepository,
ContextBackOfficeInterface $contextManager,
- Create a ticketCreate a ticket
Function getColumnsDefinition
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getColumnsDefinition() {
return [
{
name: "label",
title: Translator.trans('open_orchestra_backoffice.table.shared_block.label'),
- Create a ticketCreate a ticket
Method formAction
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function formAction(Request $request, $siteId, $nodeId, $language, $version)
{
$nodeRepository = $this->get('open_orchestra_model.repository.node');
if (null === $version) {
$node = $nodeRepository->findInLastVersion($nodeId, $language, $siteId);
- Create a ticketCreate a ticket
Method provideEvent
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function provideEvent()
{
$formData0 = new ArrayCollection(array(
'order0' => true,
'order1' => true,
- Create a ticketCreate a ticket
Method testTransform
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testTransform(
$id,
$contentId,
$contentType,
$name,
- Create a ticketCreate a ticket
Method configureOptions
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'data_class' => $this->contentClass,
'is_statusable' => false,
- Create a ticketCreate a ticket
Method setUp
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setUp()
{
$this->keywordToDocumentManager = Phake::mock('OpenOrchestra\Backoffice\Manager\KeywordToDocumentManager');
$this->keywordRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\KeywordRepositoryInterface');
- Create a ticketCreate a ticket
Function _activateSortableBlocks
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_activateSortableBlocks($template) {
$('.block-container > div', $template).sortable({
items: '> .block-item',
handle: '.move-block',
connectWith: '.block-container > div',
- Create a ticketCreate a ticket
Method setUp
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setUp()
{
$this->keywordToDocumentManager = Phake::mock('OpenOrchestra\Backoffice\Manager\KeywordToDocumentManager');
$this->keywordRepository = Phake::mock('OpenOrchestra\ModelInterface\Repository\KeywordRepositoryInterface');
- Create a ticketCreate a ticket
Method setUp
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setUp()
{
$siteAlias1 = Phake::mock('OpenOrchestra\ModelInterface\Model\SiteAliasInterface');
Phake::when($siteAlias1)->getDomain()->thenReturn($this->siteDomain1);
$siteAlias2 = Phake::mock('OpenOrchestra\ModelInterface\Model\SiteAliasInterface');
- Create a ticketCreate a ticket
Method setUp
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setUp()
{
$translator = Phake::mock('Symfony\Component\Translation\TranslatorInterface');
Phake::when($translator)->trans(\Phake::anyParameters())->thenReturn('test');
$configuration = array(
- Create a ticketCreate a ticket
Method testPreSetData
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testPreSetData($id, $edit, $new)
{
$choices = array(
'default' => 'default',
'full_page' => 'full_page',
- Create a ticketCreate a ticket
Function _renderNodeActionToolbar
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_renderNodeActionToolbar($selector, routeName) {
this._displayLoader($selector);
let statuses = new Statuses();
let nodeVersions = new Nodes();
$.when(
- Create a ticketCreate a ticket
Method getNotSupportedSubjects
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getNotSupportedSubjects()
{
$node = $this->createPhakeNode();
$content = $this->createPhakeContent();
$trashItem = $this->createPhakeTrashItem();
- Create a ticketCreate a ticket
Method setUp
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setUp()
{
$this->site = Phake::mock('OpenOrchestra\ModelInterface\Model\ReadSiteInterface');
Phake::when($this->site)->getSiteId()->thenReturn($this->siteId);
- Create a ticketCreate a ticket
Function RenderToolbarViewMixin
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
let RenderToolbarViewMixin = (superclass) => class extends superclass {
/**
* @param {Object} $selector
* @param {string} routeName
- 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"