iranianpep/code-jetter

View on GitHub

Showing 251 of 1,173 total issues

Function forgetPassword has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function forgetPassword(User $user)
    {
        $output = new Output();

        if ($this->isUserActive($user) !== true) {
Severity: Minor
Found in components/user/services/UserAuthentication.php - About 25 mins to fix

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 updateQueryStringParameter has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function updateQueryStringParameter(uri, key, value)
{
    var re = new RegExp("([?|&])" + key + "=.*?(&|#|$)", "i");

    if (uri.match(re)) {
Severity: Minor
Found in public/scripts/script.js - About 25 mins to fix

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 batchDeleteMember has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function batchDeleteMember()
    {
        $inputs = (new Request('POST'))->getInputs();

        /**
Severity: Minor
Found in components/user/controllers/AdminUserController.php - About 25 mins to fix

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 safeBatchDeleteMessage has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function safeBatchDeleteMessage()
    {
        $inputs = (new Request('POST'))->getInputs();

        /**
Severity: Minor
Found in components/contact/controllers/ContactController.php - About 25 mins to fix

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 safeBatchDeleteChild has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function safeBatchDeleteChild()
    {
        $inputs = (new Request('POST'))->getInputs();

        /**
Severity: Minor
Found in components/user/controllers/MemberUserController.php - About 25 mins to fix

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 safeBatchDeleteMember has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function safeBatchDeleteMember()
    {
        $inputs = (new Request('POST'))->getInputs();

        /**
Severity: Minor
Found in components/user/controllers/AdminUserController.php - About 25 mins to fix

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 safeBatchDeleteGroup has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function safeBatchDeleteGroup()
    {
        $inputs = (new Request('POST'))->getInputs();

        /**
Severity: Minor
Found in components/user/controllers/MemberGroupController.php - About 25 mins to fix

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 getChildren has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function getChildren(
        array $criteria = [],
        $order = '',
        $start = 0,
        $limit = 0,
Severity: Minor
Found in components/user/mappers/MemberUserMapper.php - About 25 mins to fix

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 getHtml has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function getHtml()
    {
        if (!empty($this->getTemplatePath()) && file_exists($this->getTemplatePath())) {
            $html = include_once $this->getTemplatePath();

Severity: Minor
Found in core/layout/blocks/BaseBlock.php - About 25 mins to fix

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 validateId has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private function validateId(array $args)
    {
        $output = new Output();
        if (!isset($args['toBeCheckedInput'])) {
            $output->setSuccess(false);
Severity: Minor
Found in core/security/Validator.php - About 25 mins to fix

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 updateQuery has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function updateQuery(array $criteria, $fieldsValues, $start, $limit)
    {
        if (empty($fieldsValues)) {
            throw new \Exception('fieldsValues cannot be empty in updateQuery function');
        }
Severity: Minor
Found in core/database/QueryMaker.php - About 25 mins to fix

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

Severity
Category
Status
Source
Language