APO-Epsilon/apo-website

View on GitHub

Showing 11,898 of 11,898 total issues

Function processNewWeek has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function processNewWeek(){
  include('mysql_access.php');
  $date = $_POST['date'];
  $detail_ids = $_POST['detail_ids'];
  $exclude = $_POST['exclude'];
Severity: Minor
Found in service_admin_week_setup.php - About 1 hr 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 process_form has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function process_form() {
  include ('mysql_access.php');
  $id = $_SESSION['sessionID'];
  $event = $_POST['event'];
  $month = $_POST['month'];
Severity: Minor
Found in service_hours.php - About 1 hr 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 HashPassword has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function HashPassword($password)
{
  $random = '';

  if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) {
Severity: Minor
Found in PasswordHash.php - About 1 hr 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

Method print_login has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function print_login(){
    $error_message = "";
    if (!isset($_GET['continue'])) {
    }
    if(isset($_GET['continue'])){
Severity: Minor
Found in r8conf2016/login.php - About 1 hr to fix

    Method modifyEvent has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function modifyEvent($detail_id){
      include('mysql_access.php');
    
      $sql = "SELECT e.name AS name, d.detail_id AS detail_id, d.event_id AS id,
            d.DOW AS DOW, d.start AS start, d.end AS end,d.length,d.max
    Severity: Minor
    Found in service_admin_functions.php - About 1 hr to fix

      Method submit_event has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function submit_event($entry) {
        include ('mysql_access.php');
        $user_id = $_SESSION['sessionID'];
      
              $wresponse=$db->query("SELECT week_cd FROM week LIMIT 1");
      Severity: Minor
      Found in leader_list.php - About 1 hr to fix

        Method list_page_by_exec has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function list_page_by_exec() {
            if(isset($_GET['remove'])) {
                remove_permission($_GET['remove'], $_GET['position_id']);
            } elseif(isset($_GET['add'])) {
                add_permission($_GET['add'], $_GET['position_id']);
        Severity: Minor
        Found in exec_permissions.php - About 1 hr to fix

          Avoid using undefined variables such as '$db' which will lead to PHP notices.
          Open

                  $page_text = $db->real_escape_string($page_text);
          Severity: Minor
          Found in r8conf2016/editable_page.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$db' which will lead to PHP notices.
          Open

                  $result = $db->query($sql);
          Severity: Minor
          Found in r8conf2016/editable_page.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$db' which will lead to PHP notices.
          Open

                      $wresponse=$db->query("    SELECT count(events_listing.event_id)
          Severity: Minor
          Found in req_view.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$db' which will lead to PHP notices.
          Open

                $resultPLData = $db->query($sqlPLData);
          Severity: Minor
          Found in service_signup.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$db' which will lead to PHP notices.
          Open

            $results = $db->query($sql) or die("Error Calculating Hours");
          Severity: Minor
          Found in check_hours.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$db' which will lead to PHP notices.
          Open

              $uresponse=$db->query("SELECT firstname,lastname,email FROM contact_information WHERE id = $uid");
          Severity: Minor
          Found in event_signup_done.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$db' which will lead to PHP notices.
          Open

            $result = $db->query($sql);
          Severity: Minor
          Found in includes/family_tree_info.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$db' which will lead to PHP notices.
          Open

                                  $info=$db->query("SELECT firstname,lastname,phone FROM contact_information WHERE id=$fid");
          Severity: Minor
          Found in event_signup.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$db' which will lead to PHP notices.
          Open

              $aresponse=$db->query("SELECT username FROM contact_information WHERE email='$to'");
          Severity: Minor
          Found in login_forgotpw.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$db' which will lead to PHP notices.
          Open

          $result = $db->query($sql) or die("Error in query: " . mysqli_error());
          Severity: Minor
          Found in upload_photo.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$db' which will lead to PHP notices.
          Open

                      $query = $db->query($select) or die("Unable to get data. $db->error");
          Severity: Minor
          Found in r8conf2016/login.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$lastname' which will lead to PHP notices.
          Open

                      WHERE `lastname` = '".$lastname."'
          Severity: Minor
          Found in r8conf2016/login.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$db' which will lead to PHP notices.
          Open

                echo $db->error;
          Severity: Minor
          Found in editable_page.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Severity
          Category
          Status
          Source
          Language