Showing 251 of 1,173 total issues
Function viewMember
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function viewMember()
{
$urlParameters = $this->getURLParameters();
if (empty($urlParameters['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 resetPassword
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function resetPassword(User $user, $token, $password, $passwordConfirmation)
{
$output = new Output();
/**
* Start validating passwords - email & resetPasswordToken are already validated.
- 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 mapRowToObject
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function mapRowToObject(array $row, array $tables = [])
{
/**
* Initialize $mappedObject.
*/
- 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 updateXref
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function updateXref(array $oldXrefs, array $newXrefs)
{
$result = (new ArrayUtility())->arrayComparison($oldXrefs, $newXrefs);
if (!empty($result['toBeDeleted'])) {
- 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 __construct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __construct()
{
// True means throwing error if there is any
$mailer = new PHPMailer(true);
- 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
Method getStatesCitiesGroupedByStates
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
array $criteria = [],
$order = null,
$start = 0,
$limit = 0,
$excludeArchived = true
Method getAll
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getAll(array $criteria = [], array $fromColumns = [], $order = null, $start = 0, $limit = 0);
Method batchBindValues
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
\PDOStatement $statement,
array $criteria,
$start = 0,
$limit = 0,
array $fieldsValuesCollection = []
Method authorizeRoute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function authorizeRoute($accessRole, $rootNamespace, $component, $controller, $redirect = true)
Method selectQuery
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function selectQuery(array $criteria = [], $fromColumns = '*', $order = '', $start = 0, $limit = 0)
Method bindValues
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function bindValues(\PDOStatement $statement, array $criteria, $start = 0, $limit = 0, array $fieldsValues = [])
Function getOneByName
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getOneByName($name, $status = null, $excludeArchived = true)
{
/**
* Start validating.
*/
- 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 add
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function add(array $inputs, array $fieldsValues = [], $extraDefinedInputs = [])
{
/**
* Start validating.
*/
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
public function getGroupIds()
{
if (isset($this->groupIds)) {
return $this->groupIds;
}
- 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 populateFormWithDataObject
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function populateFormWithDataObject(data, form)
{
if (typeof data != "undefined" && typeof form != "undefined") {
// for each variable / property in data object
for (var name in data) {
- 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 getOneByUsername
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getOneByUsername($username, $status = null, $excludeArchived = true)
{
/**
* start validating.
*/
- 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 generateHeadRowByListHeaders
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function generateHeadRowByListHeaders(array $headers)
{
$headRow = new 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 getMessages
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getMessages($prepareForView = true)
{
if ($prepareForView === true) {
$stringUtility = new StringUtility();
$messages = $this->messages;
- 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 getAdditionalMetaTagsHtml
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getAdditionalMetaTagsHtml()
{
$metaTags = $this->getPage()->getMetaTags();
$metaTagsHtml = '';
- 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 singularToPlural
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function singularToPlural($string)
{
// save some time in the case that singular and plural are the same
if (in_array(strtolower($string), $this->uncountable)) {
return $string;
- 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"