atmonshi/sender

View on GitHub

Showing 54 of 54 total issues

Method parseResponse has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function parseResponse($response)
    {
        $response_headers = '';
        $raw_response = $response;
        if (!(strpos($response, "\r\n\r\n") === false)) {
Severity: Minor
Found in src/STag/CURL.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/fopen.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 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/curl.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/file.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/filegetcontents.php - About 1 hr to fix

              Method exec has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  protected function exec($_ch = null)
                  {
                      $ch = $_ch === null ? $this : $_ch;
              
                      if ($ch->multi_child) {
              Severity: Minor
              Found in src/STag/CURL.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

                    Function exec has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        protected function exec($_ch = null)
                        {
                            $ch = $_ch === null ? $this : $_ch;
                    
                            if ($ch->multi_child) {
                    Severity: Minor
                    Found in src/STag/CURL.php - About 45 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

                    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/fopen.php - About 35 mins 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/filegetcontents.php - About 35 mins 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/file.php - About 35 mins 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

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

                                  private function sendSms($serviceVars = [])
                                  {
                                      if (!isset($serviceVars['appName']) || !isset($serviceVars['host']) || !isset($serviceVars['mobiles']) || !isset($serviceVars['text'])) {
                                          throw new \Exception('There is Some Missing Parameters for this Service, Please review the documentation ');
                                      }
                              Severity: Minor
                              Found in src/STag/STagAPI.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

                              Severity
                              Category
                              Status
                              Source
                              Language