Showing 1,617 of 4,272 total issues
Function _getDeleteIcon
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function _getDeleteIcon($row, $trackParameterSource, $isSuccess = true)
{
$deleteTrackContainer = \MUtil_Html::create('div', array('class' => 'otherOrg pull-right', 'renderClosingTag' => true));
if ($row['gr2o_id_organization'] != $this->currentOrgId) {
$deleteTrackContainer[] = $this->loader->getOrganization($row['gr2o_id_organization'])->getName() . ' ';
- Read upRead up
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 getTextOutput
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getTextOutput()
{
$patchLevel = $this->getPatchLevel();
$commands = array(sprintf('-- Patch level %d structural changes', $patchLevel));
- Read upRead up
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 getHtmlOutput
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getHtmlOutput(\Zend_View_Abstract $view)
{
$table = new \MUtil_Html_TableElement();
$table->class = 'compliance timeTable table table-condensed';
- Read upRead up
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 getHtmlOutput
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getHtmlOutput(\Zend_View_Abstract $view)
{
$table = parent::getHtmlOutput($view);
$table->getOnEmpty()->class = 'centerAlign';
- Read upRead up
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 addBrowseColumn4
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function addBrowseColumn4(\MUtil_Model_Bridge_TableBridge $bridge, \MUtil_Model_ModelAbstract $model)
{
if ($model->hasAlias('gems__respondent2track')) {
$br = \MUtil_Html::create('br');
- Read upRead up
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 createForm
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function createForm($options = null)
{
if ($this->useTabbedForm) {
return new \Gems_TabForm($options);
}
- Read upRead up
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 getGroupIds
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getGroupIds()
{
$groupIds = [];
if ($this->surveys) {
foreach ($this->surveys as $survey) {
- Read upRead up
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 isAnySurveyTakenByRespondents
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function isAnySurveyTakenByRespondents()
{
foreach ($this->surveys as $survey) {
if ($survey instanceof \Gems_Tracker_Survey) {
if (! $survey->isTakenByStaff()) {
- Read upRead up
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 getExportTypeElements
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function getExportTypeElements(array $data)
{
$export = $this->loader->getExport();
$exportTypes = $this->getExportClasses($export);
- Read upRead up
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 _createMultiElement
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function _createMultiElement($class, $name, $options, $empty)
{
if ($options instanceof \MUtil_Model_ModelAbstract) {
$options = $options->get($name, 'multiOptions');
} elseif (is_string($options)) {
- Read upRead up
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 loadFormData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function loadFormData()
{
// \MUtil_Echo::track(file_get_contents('php://input'));
parent::loadFormData();
// \MUtil_Echo::track($this->formData);
- Read upRead up
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 getUploadDir
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getUploadDir($subdir = null)
{
$dir = GEMS_ROOT_DIR . '/var/uploads';
if ($subdir) {
- Read upRead up
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 beforeSave
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function beforeSave()
{
if (isset($this->formData['grl_parents']) && (! is_array($this->formData['grl_parents']))) {
$this->formData['grl_parents'] = explode(',', $this->formData['grl_parents']);
}
- Read upRead up
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 addBrowseTableColumns
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function addBrowseTableColumns(\MUtil_Model_Bridge_TableBridge $bridge, \MUtil_Model_ModelAbstract $model)
{
$tData = $this->util->getTokenData();
$bridge->gr2t_id_respondent_track; // Data needed for edit button
- Read upRead up
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 getTaskRunnerBatch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getTaskRunnerBatch($id, \MUtil_Batch_Stack_Stackinterface $stack = null)
{
$id = preg_replace('/[^a-zA-Z0-9_]/', '', $id);
if ((null == $stack) && isset($this->_containers[0]->cache)) {
- Read upRead up
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 loadFormData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function loadFormData()
{
parent::loadFormData();
$surveyId = $this->request->getParam(\MUtil_Model::REQUEST_ID);
- Read upRead up
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 loadFormData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function loadFormData()
{
parent::loadFormData();
//if (!isset($this->formData['to']) || !is_array($this->formData['to'])) {
if (!$this->request->isPost()) {
- Read upRead up
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 loadFormData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function loadFormData()
{
parent::loadFormData();
if (isset($this->formData['gor_id_organization']) && $this->formData['gor_id_organization']) {
- Read upRead up
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 hasHtmlOutput
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function hasHtmlOutput()
{
$logId = $this->request->getParam(\MUtil_Model::REQUEST_ID);
if (! $logId) {
$this->addMessage($this->_('Cannot find mail log item!'));
- Read upRead up
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 getDefaultFormValues
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function getDefaultFormValues()
{
if ($this->formData) {
return $this->formData;
}
- Read upRead up
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"