open-orchestra/open-orchestra-cms-bundle

View on GitHub

Showing 318 of 14,363 total issues

Function generateRoutesForRedirection has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    protected function generateRoutesForRedirection(RedirectionInterface $redirection, ReadSiteInterface $site)
    {
        $routes = array();

        $node = $this->getNodeForRedirection($redirection);
Severity: Minor
Found in Backoffice/Manager/RouteDocumentManager.php - About 45 mins to fix

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 testCreateRedirectionToUrl has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function testCreateRedirectionToUrl($locale, $id, $aliasIds, $permanent, $pattern, $url)
Severity: Minor
Found in Backoffice/Tests/Manager/RouteDocumentManagerTest.php - About 45 mins to fix

Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

        $facadeClass,
        MultiLanguagesChoiceManagerInterface $multiLanguagesChoiceManager,
        TranslatorInterface $translator,
        AuthorizationCheckerInterface $authorizationChecker,
        StatusUsageFinder $usageFinder,
Severity: Minor
Found in WorkflowAdminBundle/Transformer/StatusTransformer.php - About 45 mins to fix

Method updateBlockPositionAction has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function updateBlockPositionAction(Request $request, $nodeId, $language, $version, $siteId)
Severity: Minor
Found in ApiBundle/Controller/NodeController.php - About 35 mins to fix

Method createForm has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function createForm($type, $data = null, array $options = array(), $editionRole = null, StatusInterface $status = null)
Severity: Minor
Found in BackofficeBundle/Controller/NodeController.php - About 35 mins to fix

Method formAction has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function formAction(Request $request, $siteId, $nodeId, $language, $version)
Severity: Minor
Found in BackofficeBundle/Controller/NodeController.php - About 35 mins to fix

Method testInitializeNewContent has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function testInitializeNewContent($contentType, $language, $linkedToSite, $siteId, $isStatusable)
Severity: Minor
Found in Backoffice/Tests/Manager/ContentManagerTest.php - About 35 mins to fix

Method testcreateOrUpdateForRedirectionToNode has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function testcreateOrUpdateForRedirectionToNode($locale, $id, $aliasIds, $permanent, $pattern)
Severity: Minor
Found in Backoffice/Tests/Manager/RouteDocumentManagerTest.php - About 35 mins to fix

Method copyTranslatedBlocksInAreaAction has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function copyTranslatedBlocksInAreaAction(Request $request, $nodeId, $language, $version, $areaId)
Severity: Minor
Found in ApiBundle/Controller/NodeController.php - About 35 mins to fix

Method newAction has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function newAction(Request $request, $siteId, $language, $parentId, $order)
Severity: Minor
Found in BackofficeBundle/Controller/NodeController.php - About 35 mins to fix

Method testCreateForSiteWithRedirection has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function testCreateForSiteWithRedirection($locale, $id, $aliasIds, $permanent, $pattern)
Severity: Minor
Found in Backoffice/Tests/Manager/RouteDocumentManagerTest.php - About 35 mins to fix

Method createErrorNodeWithStatus has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    protected function createErrorNodeWithStatus(StatusInterface $status, $nodeId, $name, $language, SiteInterface $site)
Severity: Minor
Found in Backoffice/EventSubscriber/CreateMandatoryNodesSubscriber.php - About 35 mins to fix

Method completeRoutePattern has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    protected function completeRoutePattern($parentId = null, $suffix = null, $language, $siteId, array $routePattern)
Severity: Minor
Found in Backoffice/Manager/RouteDocumentManager.php - About 35 mins to fix

Method checkRemoveReferencesToEntity has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    protected function checkRemoveReferencesToEntity($entity, $entityId, array $usedItems, $entityType, $itemRepository)
Severity: Minor
Found in Backoffice/Tests/Reference/Strategies/AbstractReferenceStrategyTest.php - About 35 mins to fix

Method generateNode has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    protected function generateNode($language, $id, $pattern, $parentId, $nodeId)
Severity: Minor
Found in Backoffice/Tests/Manager/RouteDocumentManagerTest.php - About 35 mins to fix

Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        ContextBackOfficeInterface $contextManager,
        EventSubscriberInterface $fieldTypeTypeSubscriber,
        array $backOfficeLanguages,
        array $fieldTypeParameters,
        $fieldTypeClass
Severity: Minor
Found in Backoffice/Form/Type/FieldTypeType.php - About 35 mins to fix

Method testBuilder has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function testBuilder($creation, $formTimes, $transformerTimes, $subscriberTimes, $dispatcherTimes)
Severity: Minor
Found in GroupBundle/Tests/Form/Type/GroupTypeTest.php - About 35 mins to fix

Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        StatusRepositoryInterface $statusRepository,
        ContextBackOfficeInterface $contextManager,
        $contentClass,
        UniqueIdGenerator $uniqueIdGenerator,
        TokenStorage $tokenStorage
Severity: Minor
Found in Backoffice/Manager/ContentManager.php - About 35 mins to fix

Method testVote has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function testVote($object, $attribute, array $roles, $inPerimeter, $expectedVote)
Severity: Minor
Found in Backoffice/Tests/Security/Authorization/Voter/AbstractVoterTest.php - About 35 mins to fix

Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        $siteClass,
        TranslatorInterface $translator,
        TemplateManager $templateManager,
        EventSubscriberInterface $webSiteSubscriber,
        EventDispatcherInterface $eventDispatcher
Severity: Minor
Found in Backoffice/Form/Type/SiteType.php - About 35 mins to fix
Severity
Category
Status
Source
Language