Showing 318 of 14,363 total issues
Function validate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public function validate($value, Constraint $constraint)
{
if ($constraint instanceof UnremovableLanguageConditionInterface) {
$languages = array();
foreach ($value as $alias) {
- 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 testCreateRedirectionToUrl
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function testCreateRedirectionToUrl($locale, $id, $aliasIds, $permanent, $pattern, $url)
- Create a ticketCreate a ticket
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$facadeClass,
MultiLanguagesChoiceManagerInterface $multiLanguagesChoiceManager,
TranslatorInterface $translator,
AuthorizationCheckerInterface $authorizationChecker,
StatusUsageFinder $usageFinder,
- Create a ticketCreate a ticket
Method testInitializeNewContent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function testInitializeNewContent($contentType, $language, $linkedToSite, $siteId, $isStatusable)
- Create a ticketCreate a ticket
Method testcreateOrUpdateForRedirectionToNode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function testcreateOrUpdateForRedirectionToNode($locale, $id, $aliasIds, $permanent, $pattern)
- Create a ticketCreate a ticket
Method copyTranslatedBlocksInAreaAction
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function copyTranslatedBlocksInAreaAction(Request $request, $nodeId, $language, $version, $areaId)
- Create a ticketCreate a ticket
Method updateBlockPositionAction
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function updateBlockPositionAction(Request $request, $nodeId, $language, $version, $siteId)
- Create a ticketCreate a ticket
Method newAction
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function newAction(Request $request, $siteId, $language, $parentId, $order)
- Create a ticketCreate a ticket
Method testCreateForSiteWithRedirection
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function testCreateForSiteWithRedirection($locale, $id, $aliasIds, $permanent, $pattern)
- Create a ticketCreate a ticket
Method formAction
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function formAction(Request $request, $siteId, $nodeId, $language, $version)
- Create a ticketCreate a ticket
Method createForm
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function createForm($type, $data = null, array $options = array(), $editionRole = null, StatusInterface $status = null)
- Create a ticketCreate a ticket
Method testVote
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function testVote($object, $attribute, array $roles, $inPerimeter, $expectedVote)
- Create a ticketCreate a ticket
Method generateNode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function generateNode($language, $id, $pattern, $parentId, $nodeId)
- Create a ticketCreate a ticket
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
StatusRepositoryInterface $statusRepository,
ContextBackOfficeInterface $contextManager,
$contentClass,
UniqueIdGenerator $uniqueIdGenerator,
TokenStorage $tokenStorage
- Create a ticketCreate a ticket
Method checkRemoveReferencesToEntity
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function checkRemoveReferencesToEntity($entity, $entityId, array $usedItems, $entityType, $itemRepository)
- Create a ticketCreate a ticket
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Session $session,
TokenStorageInterface $tokenStorage,
$defaultLocale,
SiteRepositoryInterface $siteRepository,
AuthorizationCheckerInterface $authorizationChecker
- Create a ticketCreate a ticket
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ContextBackOfficeInterface $contextManager,
EventSubscriberInterface $fieldTypeTypeSubscriber,
array $backOfficeLanguages,
array $fieldTypeParameters,
$fieldTypeClass
- Create a ticketCreate a ticket
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$facadeClass,
AuthorizationCheckerInterface $authorizationChecker,
MultiLanguagesChoiceManagerInterface $multiLanguagesChoiceManager,
GroupRepositoryInterface $groupRepository,
BusinessRulesManager $businessRulesManager
- Create a ticketCreate a ticket
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
CsvToReferenceKeywordTransformer $csvToReferenceKeywordTransformer,
ConditionToReferenceKeywordTransformer $conditionToReferenceKeywordTransformer,
KeywordRepositoryInterface $keywordRepository,
RouterInterface $router,
AuthorizationCheckerInterface $authorizationChecker
- Create a ticketCreate a ticket
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$routeDocumentClass,
SiteRepositoryInterface $siteRepository,
NodeRepositoryInterface $nodeRepository,
RedirectionRepositoryInterface $redirectionRepository,
RouteDocumentRepositoryInterface $routeDocumentRepository
- Create a ticketCreate a ticket