marcelog/PAMI

View on GitHub
src/PAMI/Message/Event/AttendedTransferEvent.php

Summary

Maintainability
D
1 day
Test Coverage
A
100%

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

    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

      The class AttendedTransferEvent has an overall complexity of 77 which is very high. The configured complexity threshold is 50.
      Open

      class AttendedTransferEvent extends EventMessage
      {
          const RESULT_FAIL = 'Fail';
          const RESULT_INVALID = 'Invalid';
          const RESULT_NOT_PERMITTED = 'Not Permitted';

      The class AttendedTransferEvent has 77 public methods and attributes. Consider reducing the number of public items to less than 45.
      Open

      class AttendedTransferEvent extends EventMessage
      {
          const RESULT_FAIL = 'Fail';
          const RESULT_INVALID = 'Invalid';
          const RESULT_NOT_PERMITTED = 'Not Permitted';

      ExcessivePublicCount

      Since: 0.1

      A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.

      Example

      public class Foo {
          public $value;
          public $something;
          public $var;
          // [... more more public attributes ...]
      
          public function doWork() {}
          public function doMoreWork() {}
          public function doWorkAgain() {}
          // [... more more public methods ...]
      }

      Source https://phpmd.org/rules/codesize.html#excessivepubliccount

      There are no issues that match your filters.

      Category
      Status