marcelog/PAMI

View on GitHub

Showing 30 of 282 total issues

AttendedTransferEvent has 77 functions (exceeds 20 allowed). Consider refactoring.
Open

class AttendedTransferEvent extends EventMessage
{
    const RESULT_FAIL = 'Fail';
    const RESULT_INVALID = 'Invalid';
    const RESULT_NOT_PERMITTED = 'Not Permitted';
Severity: Major
Found in src/PAMI/Message/Event/AttendedTransferEvent.php - About 1 day to fix

    DongleDeviceEntryEvent has 59 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class DongleDeviceEntryEvent extends EventMessage
    {
        /**
         * Returns key: 'Device'.
         *
    Severity: Major
    Found in src/PAMI/Message/Event/DongleDeviceEntryEvent.php - About 1 day to fix

      UnParkedCallEvent has 51 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class UnParkedCallEvent extends EventMessage
      {
          /**
           * Returns key: 'Privilege'.
           *
      Severity: Major
      Found in src/PAMI/Message/Event/UnParkedCallEvent.php - About 7 hrs to fix

        Method run has 140 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function run()
            {
                $this->log('Run');
                $client = $this->getAgi();
                $loggerFacade = $client->getAsteriskLogger();
        Severity: Major
        Found in doc/examples/asyncagi/MyPAGIApplication.php - About 5 hrs to fix

          BlindTransferEvent has 36 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class BlindTransferEvent extends EventMessage
          {
              const RESULT_FAIL = 'Fail';
              const RESULT_INVALID = 'Invalid';
              const RESULT_NOT_PERMITTED = 'Not Permitted';
          Severity: Minor
          Found in src/PAMI/Message/Event/BlindTransferEvent.php - About 4 hrs to fix

            Function run has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
            Open

                public function run()
                {
                    $this->log('Run');
                    $client = $this->getAgi();
                    $loggerFacade = $client->getAsteriskLogger();
            Severity: Minor
            Found in doc/examples/asyncagi/MyPAGIApplication.php - About 3 hrs 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

            ParkedCallTimeOutEvent has 30 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class ParkedCallTimeOutEvent extends EventMessage
            {
                /**
                 * Returns key: 'Privilege'.
                 *
            Severity: Minor
            Found in src/PAMI/Message/Event/ParkedCallTimeOutEvent.php - About 3 hrs to fix

              ParkedCallGiveUpEvent has 30 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class ParkedCallGiveUpEvent extends EventMessage
              {
                  /**
                   * Returns key: 'Privilege'.
                   *
              Severity: Minor
              Found in src/PAMI/Message/Event/ParkedCallGiveUpEvent.php - About 3 hrs to fix

                File AttendedTransferEvent.php has 317 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                /**
                 * Event triggered when a call is transfered.
                 *
                 * PHP Version 5
                Severity: Minor
                Found in src/PAMI/Message/Event/AttendedTransferEvent.php - About 3 hrs to fix

                  DialBeginEvent has 27 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class DialBeginEvent extends EventMessage
                  {
                      /**
                       * Returns key: 'Privilege'.
                       *
                  Severity: Minor
                  Found in src/PAMI/Message/Event/DialBeginEvent.php - About 3 hrs to fix

                    ParkedCallEvent has 27 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class ParkedCallEvent extends EventMessage
                    {
                        /**
                         * Returns key: 'Privilege'.
                         *
                    Severity: Minor
                    Found in src/PAMI/Message/Event/ParkedCallEvent.php - About 3 hrs to fix

                      DialEndEvent has 26 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class DialEndEvent extends EventMessage
                      {
                          /**
                           * Returns key: 'Privilege'.
                           *
                      Severity: Minor
                      Found in src/PAMI/Message/Event/DialEndEvent.php - About 3 hrs to fix

                        VoicemailUserEntryEvent has 25 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class VoicemailUserEntryEvent extends EventMessage
                        {
                            /**
                             * Returns key: 'NewMessageCount'.
                             *
                        Severity: Minor
                        Found in src/PAMI/Message/Event/VoicemailUserEntryEvent.php - About 2 hrs to fix

                          CELEvent has 23 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class CELEvent extends EventMessage
                          {
                              /**
                               * Returns key: 'AMAFlags'.
                               *
                          Severity: Minor
                          Found in src/PAMI/Message/Event/CELEvent.php - About 2 hrs to fix

                            ConfbridgeTalkingEvent has 23 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class ConfbridgeTalkingEvent extends EventMessage
                            {
                                /**
                                 * Returns key: 'Privilege'.
                                 *
                            Severity: Minor
                            Found in src/PAMI/Message/Event/ConfbridgeTalkingEvent.php - About 2 hrs to fix

                              ConfbridgeJoinEvent has 22 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class ConfbridgeJoinEvent extends EventMessage
                              {
                                  /**
                                   * Returns key: 'Privilege'.
                                   *
                              Severity: Minor
                              Found in src/PAMI/Message/Event/ConfbridgeJoinEvent.php - About 2 hrs to fix

                                ConfbridgeUnmuteEvent has 22 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                class ConfbridgeUnmuteEvent extends EventMessage
                                {
                                    /**
                                     * Returns key: 'Privilege'.
                                     *
                                Severity: Minor
                                Found in src/PAMI/Message/Event/ConfbridgeUnmuteEvent.php - About 2 hrs to fix

                                  ConfbridgeMuteEvent has 22 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class ConfbridgeMuteEvent extends EventMessage
                                  {
                                      /**
                                       * Returns key: 'Privilege'.
                                       *
                                  Severity: Minor
                                  Found in src/PAMI/Message/Event/ConfbridgeMuteEvent.php - About 2 hrs to fix

                                    ConfbridgeLeaveEvent has 22 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    class ConfbridgeLeaveEvent extends EventMessage
                                    {
                                        /**
                                         * Returns key: 'Privilege'.
                                         *
                                    Severity: Minor
                                    Found in src/PAMI/Message/Event/ConfbridgeLeaveEvent.php - About 2 hrs to fix

                                      Method __construct has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function __construct($rawContent)
                                          {
                                              parent::__construct();
                                              $this->channelVariables = array('default' => array());
                                              $this->rawContent = $rawContent;
                                      Severity: Minor
                                      Found in src/PAMI/Message/IncomingMessage.php - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language