Showing 318 of 14,363 total issues
Method testCreateNewErrorNode
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function testCreateNewErrorNode($nodeId, $name, $parentId, $siteId, $language, $template)
- Create a ticketCreate a ticket
Method testBuildView
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function testBuildView($isInitial, $isTranslation, $isPublished, $isautoPublish, $isAutounpublish, array $expectedProperties)
- Create a ticketCreate a ticket
Function deserializeFieldType
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function deserializeFieldType(GenericDeserializationVisitor $visitor, $contentAttributeValue, array $type, Context $context)
{
$facade = $visitor->getCurrentObject();
if ($facade instanceof ContentAttributeFacade && null !== $facade->type) {
if (isset($this->fieldTypes[$facade->type]) &&
- 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 testVote
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function testVote($object, $attribute, array $roles, $inPerimeter, $expectedVote, $inProfile = true)
- Create a ticketCreate a ticket
Method addBlockInAreaAction
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addBlockInAreaAction($nodeId, $language, $version, $blockId, $areaId, $position)
- Create a ticketCreate a ticket
Method deleteBlockInAreaAction
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function deleteBlockInAreaAction($nodeId, $siteId, $language, $version, $blockId, $areaName)
- Create a ticketCreate a ticket
Method testCreateForNode
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function testCreateForNode($language, $id, array $aliasIds, $pattern, $exceptedPattern, $parentId = null)
- Create a ticketCreate a ticket
Method testCreateForSite
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function testCreateForSite($language, $id, array $aliasIds, $pattern, $exceptedPattern, $parentId = null)
- Create a ticketCreate a ticket
Method testVote
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function testVote($object, $attribute, array $roles, $inPerimeter, $expectedVote, $inProfile = true)
- Create a ticketCreate a ticket
Function _highlight
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
_highlight(name) {
let breadcrumb = this.getBreadcrumbHighlight();
let menu = this.getMenuHighlight();
if (breadcrumb !== null) {
- 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 testBuildView
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function testBuildView($groupEnabled, array $groupIds, array $subGroupIds, array $groupRender, array $subGroupRender, array $expectedResult)
- Create a ticketCreate a ticket
Method verifyRedirectionRoutes
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function verifyRedirectionRoutes(array $routeDocuments, $locale, $id, array $aliasIds, $mongoNodeId, $permanent)
- Create a ticketCreate a ticket
Method createNewErrorNode
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function createNewErrorNode($nodeId, $name, $parentId, $siteId, $language, $template)
- Create a ticketCreate a ticket
Function postSubmit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function postSubmit(FormEvent $event)
{
if (($group = $event->getData()) instanceof GroupInterface) {
$isSiteAdmin = $group->hasRole(ContributionRoleInterface::SITE_ADMIN);
$siteId = $group->getSite()->getSiteId();
- 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 verifyNodeRoutes
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function verifyNodeRoutes($language, $id, array $aliasIds, $exceptedPattern, $routeDocuments, $nodeId)
- Create a ticketCreate a ticket
Function transform
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function transform($keywords)
{
if (null === $keywords) {
return '';
}
- 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 getStyleChoices
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function getStyleChoices(array $options)
{
$choices = array();
if (
isset($options['data']) &&
- 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 __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$class,
array $availableLanguages,
EventSubscriberInterface $userProfilSubscriber,
EventSubscriberInterface $userGroupSubscriber,
TranslatorInterface $translator,
- Create a ticketCreate a ticket
Function validate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. 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 __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
TemplateManager $templateManager,
ContextBackOfficeInterface $contextManager,
SiteRepositoryInterface $siteRepository,
GenerateFormManager $generateFormManager,
BlockToArrayTransformer $blockToArrayTransformer,
- Create a ticketCreate a ticket