Showing 318 of 14,363 total issues
Method setUp
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setUp()
{
$this->authorizationChecker = Phake::mock('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface');
$this->groupContext = Phake::mock('OpenOrchestra\BaseApi\Context\GroupContext');
$multiLanguagesChoiceManager = Phake::mock('OpenOrchestra\ModelInterface\Manager\MultiLanguagesChoiceManagerInterface');
- Create a ticketCreate a ticket
Function OrchestraApiSyncMixin
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
let OrchestraApiSyncMixin = (superclass) => class extends superclass {
/**
* Get url by method
*
- 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 execute
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
if ($siteId = $input->getOption('siteId')) {
$site = $this->getContainer()->get('open_orchestra_model.repository.site')->findOneBySiteId($siteId);
if ($site) {
- 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 execute
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
if ($siteId = $input->getOption('siteId')) {
$site = $this->getContainer()->get('open_orchestra_model.repository.site')->findOneBySiteId($siteId);
if ($site) {
- 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 activate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
activate($element) {
let tags = $element.data('tags');
let prepopulatedTags = $element.val().split(' ');
let context = this;
$element.tokenInput(tags, {
- 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 partialReverseTransform
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function partialReverseTransform($keywords, $asString = true)
{
$keywordArray = $this->getKeywordAsArray($keywords);
$referenceKeywords = new ArrayCollection();
- 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 canChangeToPublishStatus
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function canChangeToPublishStatus(NodeInterface $node, array $parameters)
{
$areas = $node->getAreas();
$routePattern = $node->getRoutePattern();
foreach ($areas as $area) {
- 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 transform
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function transform($value)
{
foreach ($this->groupRolesConfiguration as $tables) {
foreach ($tables as $package => $rows) {
foreach ($rows as $row => $roles) {
- 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 manageVersionsContent
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
manageVersionsContent(contentTypeId, language, contentId, page) {
this._displayLoader(Application.getRegion('content'));
if (null === page) {
page = 1
- Create a ticketCreate a ticket
Function getColumnsDefinition
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
getColumnsDefinition() {
return [
{
name: "date_time",
title: Translator.trans('open_orchestra_log.table.date'),
- Create a ticketCreate a ticket
Function getColumnsDefinition
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
getColumnsDefinition() {
return [
this._getColumnsDefinitionDeleteCheckbox(),
{
name: "name",
- Create a ticketCreate a ticket
Method findUsageReferenceInOtherSite
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function findUsageReferenceInOtherSite($siteId, $entities)
{
$usedOtherSite = array();
$supportedEntities = array(BlockInterface::ENTITY_TYPE, ContentInterface::ENTITY_TYPE);
/** @var UseTrackableInterface $entity */
- Create a ticketCreate a ticket
Method provideDeleteVersionContent
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function provideDeleteVersionContent()
{
$status0 = Phake::mock('OpenOrchestra\ModelInterface\Model\StatusInterface');
Phake::when($status0)->isPublishedState()->thenReturn(false);
$content0 = Phake::mock('OpenOrchestra\ModelInterface\Model\ContentInterface');
- Create a ticketCreate a ticket
Function _submitPatch
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
_submitPatch(event, context) {
Backbone.Events.trigger('form:deactivate', this);
let formView = this;
let $form = $('form', this.$el);
- Create a ticketCreate a ticket
Method getOkVotes
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getOkVotes()
{
$log = $this->createPhakeLog();
$site = $this->createPhakeSite();
$redirection = $this->createPhakeRedirection();
- Create a ticketCreate a ticket
Method newAction
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function newAction(Request $request)
{
$this->denyAccessUnlessGranted(ContributionActionInterface::CREATE, UserInterface::ENTITY_TYPE);
$userClass = $this->container->getParameter('open_orchestra_user.document.user.class');
- Create a ticketCreate a ticket
Method voteOnAttribute
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
{
if ($this->isSuperAdmin($token)) {
return true;
}
- Create a ticketCreate a ticket
Function editNode
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
editNode(nodeId, language, version = null) {
this._displayLoader(Application.getRegion('content'));
let url = Routing.generate('open_orchestra_backoffice_node_form', {
siteId : Application.getContext().get('siteId'),
nodeId : nodeId,
- Create a ticketCreate a ticket
Method execute
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$io = new SymfonyStyle($input, $output);
$siteRepository = $this->getContainer()->get('open_orchestra_model.repository.site');
- Create a ticketCreate a ticket
Function listUser
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
listUser(page) {
if (null === page) {
page = 1
}
this._displayLoader(Application.getRegion('content'));
- Create a ticketCreate a ticket