Showing 1,593 of 14,443 total issues
Method indexAction
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function indexAction()
{
$this->disableLayout();
$itemIds = $this->getParam('items');
$folderIds = $this->getParam('folders');
- Create a ticketCreate a ticket
Method testCommunityCreate
has 163 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testCommunityCreate()
{
/** @var CommunityModel $communityModel */
$communityModel = MidasLoader::loadModel('Community');
$communities = $communityModel->getAll();
- Create a ticketCreate a ticket
Function loadModuleElements
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function loadModuleElements()
{
if (isset($this->_moduleModels)) {
MidasLoader::loadModels($this->_moduleModels, $this->moduleName);
$modelsArray = Zend_Registry::get('models');
- 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 loadModuleElements
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function loadModuleElements()
{
if (isset($this->_moduleModels)) {
MidasLoader::loadModels($this->_moduleModels, $this->moduleName);
$modelsArray = Zend_Registry::get('models');
- 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
File ApiComponent.php
has 434 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*=========================================================================
Midas Server
Copyright Kitware SAS, 26 rue Louis Guérin, 69100 Villeurbanne, France.
All rights reserved.
- Create a ticketCreate a ticket
File DashboardModelTest.php
has 432 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*=========================================================================
Midas Server
Copyright Kitware SAS, 26 rue Louis Guérin, 69100 Villeurbanne, France.
All rights reserved.
- Create a ticketCreate a ticket
File ApiComponent.php
has 432 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*=========================================================================
Midas Server
Copyright Kitware SAS, 26 rue Louis Guérin, 69100 Villeurbanne, France.
All rights reserved.
- Create a ticketCreate a ticket
Function getMatchingFilesRecursive
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function getMatchingFilesRecursive($src, $dir = '')
{
$files = array();
if (!is_dir($src)) {
$files[] = $src;
- 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 parse
has 153 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static Object parse(
XMLTokener x,
boolean arrayForm,
JSONArray ja
) throws JSONException {
- Create a ticketCreate a ticket
Method parse
has 153 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static Object parse(
XMLTokener x,
boolean arrayForm,
JSONArray ja
) throws JSONException {
- Create a ticketCreate a ticket
File ParaviewController.php
has 419 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*=========================================================================
Midas Server
Copyright Kitware SAS, 26 rue Louis Guérin, 69100 Villeurbanne, France.
All rights reserved.
- Create a ticketCreate a ticket
JSONArray
has 44 methods (exceeds 20 allowed). Consider refactoring. Open
public class JSONArray {
/**
* The arrayList where the JSONArray's properties are kept.
- Create a ticketCreate a ticket
JSONArray
has 44 methods (exceeds 20 allowed). Consider refactoring. Open
public class JSONArray {
/**
* The arrayList where the JSONArray's properties are kept.
- Create a ticketCreate a ticket
Function _recursiveParseDirectory
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
private function _recursiveParseDirectory($path, $currentdir)
{
$it = new DirectoryIterator($path);
foreach ($it as $fileInfo) {
if ($fileInfo->isDot()) {
- 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 testFolderAddRemovePolicyuser
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testFolderAddRemovePolicyuser()
{
/** @var UserModel $userModel */
$userModel = MidasLoader::loadModel('User');
- Create a ticketCreate a ticket
File paraview.slice.js
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Midas Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.
/* global JavaScriptRenderer */
/* global json */
- Create a ticketCreate a ticket
Function createThumbnailFromPath
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public function createThumbnailFromPath($name, $fullPath, $width, $height, $exact = true)
{
/** @var SettingModel $settingModel */
$settingModel = MidasLoader::loadModel('Setting');
$provider = $settingModel->getValueByName(MIDAS_THUMBNAILCREATOR_PROVIDER_KEY, $this->moduleName);
- 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 policyCheck
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public function policyCheck($communityDao, $userDao = null, $policy = MIDAS_POLICY_READ)
{
if (!$communityDao instanceof CommunityDao || !is_numeric($policy)) {
throw new Zend_Exception(
'Error in param: communityDao should be a CommunityDao and policy should be numeric.'
- 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 movecopyAction
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function movecopyAction()
{
$copytype = $this->getParam('copytype');
if (isset($copytype) && $copytype == 'reference') {
$shareSubmit = true;
- Create a ticketCreate a ticket
Method indexAction
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function indexAction()
{
$this->requireAdminPrivileges();
$this->view->header = 'Administration';
- Create a ticketCreate a ticket