atmonshi/sender

View on GitHub
src/mobilyWs/fsockopen.php

Summary

Maintainability
D
2 days
Test Coverage

File fsockopen.php has 320 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
//دالة فحص  حالة الإرسال بإستخدام بوابة fsockopen
function sendStatus($viewResult=1)
{
    global $arraySendStatus;
Severity: Minor
Found in src/mobilyWs/fsockopen.php - About 3 hrs to fix

    Method sendSMSWK has 11 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function sendSMSWK($userAccount, $passAccount, $numbers, $sender, $msg, $msgKey, $MsgID, $timeSend=0, $dateSend=0, $deleteKey=0, $viewResult=1)
    Severity: Major
    Found in src/mobilyWs/fsockopen.php - About 1 hr to fix

      Method sendSMS has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function sendSMS($userAccount, $passAccount, $numbers, $sender, $msg, $MsgID, $timeSend=0, $dateSend=0, $deleteKey=0, $viewResult=1)
      Severity: Major
      Found in src/mobilyWs/fsockopen.php - About 1 hr to fix

        Method sendSMSWK has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function sendSMSWK($userAccount, $passAccount, $numbers, $sender, $msg, $msgKey, $MsgID, $timeSend=0, $dateSend=0, $deleteKey=0, $viewResult=1)
        {
            global $arraySendMsgWK;
            $applicationType = "68";
            $msg = $msg;
        Severity: Minor
        Found in src/mobilyWs/fsockopen.php - About 1 hr to fix

          Method sendSMS has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function sendSMS($userAccount, $passAccount, $numbers, $sender, $msg, $MsgID, $timeSend=0, $dateSend=0, $deleteKey=0, $viewResult=1)
          {
              global $arraySendMsg;
              $applicationType = "68";
              $msg = $msg;
          Severity: Minor
          Found in src/mobilyWs/fsockopen.php - About 1 hr to fix

            Method activeSender has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function activeSender($userAccount, $passAccount, $senderId, $activeKey, $viewResult=1)
            Severity: Minor
            Found in src/mobilyWs/fsockopen.php - About 35 mins to fix

              Function sendSMSWK has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function sendSMSWK($userAccount, $passAccount, $numbers, $sender, $msg, $msgKey, $MsgID, $timeSend=0, $dateSend=0, $deleteKey=0, $viewResult=1)
              {
                  global $arraySendMsgWK;
                  $applicationType = "68";
                  $msg = $msg;
              Severity: Minor
              Found in src/mobilyWs/fsockopen.php - About 35 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 activeSender has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function activeSender($userAccount, $passAccount, $senderId, $activeKey, $viewResult=1)
              {
                  global $arrayActiveSender;
                  $stringToPost = "mobile=".$userAccount."&password=".$passAccount."&senderId=".$senderId."&activeKey=".$activeKey;
                  $stringToPostLength = strlen($stringToPost);
              Severity: Minor
              Found in src/mobilyWs/fsockopen.php - About 35 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 checkSender has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function checkSender($userAccount, $passAccount, $senderId, $viewResult=1)
              {
                  global $arrayCheckSender;
                  $stringToPost = "mobile=".$userAccount."&password=".$passAccount."&senderId=".$senderId;
                  $stringToPostLength = strlen($stringToPost);
              Severity: Minor
              Found in src/mobilyWs/fsockopen.php - About 35 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 checkAlphasSender has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function checkAlphasSender($userAccount, $passAccount, $viewResult=1)
              {
                  global $arrayCheckAlphasSender;
                  $stringToPost = "mobile=".$userAccount."&password=".$passAccount;
                  $stringToPostLength = strlen($stringToPost);
              Severity: Minor
              Found in src/mobilyWs/fsockopen.php - About 35 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 sendStatus has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function sendStatus($viewResult=1)
              {
                  global $arraySendStatus;
                  $fsockParameter = "POST /api/sendStatus.php HTTP/1.0\r\n";
                  $fsockParameter.= "Host: www.mobily.ws \r\n";
              Severity: Minor
              Found in src/mobilyWs/fsockopen.php - About 35 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 addSender has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function addSender($userAccount, $passAccount, $sender, $viewResult=1)
              {
                  global $arrayAddSender;
                  $stringToPost = "mobile=".$userAccount."&password=".$passAccount."&sender=".$sender;
                  $stringToPostLength = strlen($stringToPost);
              Severity: Minor
              Found in src/mobilyWs/fsockopen.php - About 35 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 balanceSMS has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function balanceSMS($userAccount, $passAccount, $viewResult=1)
              {
                  global $arrayBalance;
                  $stringToPost = "mobile=".$userAccount."&password=".$passAccount;
                  $stringToPostLength = strlen($stringToPost);
              Severity: Minor
              Found in src/mobilyWs/fsockopen.php - About 35 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 addAlphaSender has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function addAlphaSender($userAccount, $passAccount, $sender, $viewResult=1)
              {
                  global $arrayAddAlphaSender;
                  $stringToPost = "mobile=".$userAccount."&password=".$passAccount."&sender=".$sender;
                  $stringToPostLength = strlen($stringToPost);
              Severity: Minor
              Found in src/mobilyWs/fsockopen.php - About 35 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 changePassword has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function changePassword($userAccount, $passAccount, $newPassAccount, $viewResult=1)
              {
                  global $arrayChangePassword;
                  $stringToPost = "mobile=".$userAccount."&password=".$passAccount."&newPassword=".$newPassAccount;
                  $stringToPostLength = strlen($stringToPost);
              Severity: Minor
              Found in src/mobilyWs/fsockopen.php - About 35 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 forgetPassword has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function forgetPassword($userAccount, $sendType, $viewResult=1)
              {
                  global $arrayForgetPassword;
                  $stringToPost = "mobile=".$userAccount."&type=".$sendType;
                  $stringToPostLength = strlen($stringToPost);
              Severity: Minor
              Found in src/mobilyWs/fsockopen.php - About 35 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 sendSMS has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function sendSMS($userAccount, $passAccount, $numbers, $sender, $msg, $MsgID, $timeSend=0, $dateSend=0, $deleteKey=0, $viewResult=1)
              {
                  global $arraySendMsg;
                  $applicationType = "68";
                  $msg = $msg;
              Severity: Minor
              Found in src/mobilyWs/fsockopen.php - About 35 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 deleteSMS has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function deleteSMS($userAccount, $passAccount, $deleteKey=0, $viewResult=1)
              {
                  global $arrayDeleteSMS;
                  $stringToPost = "mobile=".$userAccount."&password=".$passAccount."&deleteKey=".$deleteKey;
                  $stringToPostLength = strlen($stringToPost);
              Severity: Minor
              Found in src/mobilyWs/fsockopen.php - About 35 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

              There are no issues that match your filters.

              Category
              Status