Showing 1,617 of 4,272 total issues
Function createModel
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function createModel($detailed, $action)
{
$model = $this->loader->getModels()->getSurveyMaintenanceModel();
if ($detailed) {
- 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 createModel
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function createModel($detailed, $action)
{
$respondent = $this->getRespondent();
$model = $this->loader->getModels()->createEpisodeOfCareModel();
- 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 createModel
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function createModel($detailed, $action)
{
$model = $this->loader->getModels()->getConditionModel();
if ($detailed) {
- 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 getOnEmptyText
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getOnEmptyText()
{
static $warned;
$dir = $this->getPath(false, 'index');
- 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 preDispatch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function preDispatch()
{
parent::preDispatch();
$action = strtolower($this->getRequest()->getActionName());
- 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 getToken
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getToken()
{
static $token;
if ($token instanceof \Gems_Tracker_Token) {
- 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 getKeyRef
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getKeyRef($forData, $href = array(), $organizationInKey = null)
{
$keys = $this->getKeys();
if (! $organizationInKey) {
- 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 transformSaveSubModel
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function transformSaveSubModel(
\MUtil_Model_ModelAbstract $model, \MUtil_Model_ModelAbstract $sub, array &$row, array $join, $name)
{
if (!isset($row['table_keys'])) {
$tableKeys = $model->getKeys();
- 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 applyBrowseSettings
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function applyBrowseSettings()
{
$dbLookup = $this->util->getDbLookup();
$definitions = $this->loader->getUserLoader()->getAvailableStaffDefinitions();
$localized = $this->util->getLocalized();
- 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 save
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function save(array $newValues, array $filter = null, array $saveTables = null)
{
//First perform a save
$savedValues = parent::save($newValues, $filter, $saveTables);
- 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 transformFilter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function transformFilter(\MUtil_Model_ModelAbstract $model, array $filter)
{
if (is_array($this->tableKeys)) {
foreach($this->tableKeys as $tableName => $itemNames) {
foreach($itemNames as $itemName) {
- 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 translateRowValues
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function translateRowValues($row, $key)
{
$row = parent::translateRowValues($row, $key);
if (! $row) {
- 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 translateRowValues
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function translateRowValues($row, $key)
{
$row = parent::translateRowValues($row, $key);
if (! $row) {
- 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 processForm
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function processForm()
{
if ($this->request->getParam('resend') == '1') {
$authenticator = $this->user->getTwoFactorAuthenticator();
if ($authenticator instanceof SendTwoFactorCodeInterface) {
- 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 getRelationsFor
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getRelationsFor($respondentId, $patientNr = null, $organizationId = null, $onlyActive = true)
{
static $relationsCache = array();
if (is_null($respondentId)) {
- 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)
{
// Make sure these fields are loaded
$model->get('gro_valid_after_field');
$model->get('gro_valid_after_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 addTableCells
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function addTableCells(\MUtil_Model_Bridge_VerticalTableBridge $bridge)
{
$HTML = \MUtil_Html::create();
// $bridge->caption($this->getCaption());
- 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 ($this->trackEngine instanceof \Gems_Tracker_Engine_StepEngineAbstract) {
- 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 afterSave
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function afterSave($changed)
{
// Communicate to user
if ($changed >= 0) {
switch ($this->formData['change_method']) {
- 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"