timegridio/concierge

View on GitHub

Showing 85 of 85 total issues

Appointment has 55 functions (exceeds 20 allowed). Consider refactoring.
Open

class Appointment extends EloquentModel implements HasPresenter
{
    /**
     * The attributes that are mass assignable.
     *
Severity: Major
Found in src/Models/Appointment.php - About 7 hrs to fix

    File Appointment.php has 335 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace Timegridio\Concierge\Models;
    
    use Carbon\Carbon;
    Severity: Minor
    Found in src/Models/Appointment.php - About 4 hrs to fix

      The class Appointment has 28 non-getter- and setter-methods. Consider refactoring Appointment to keep number of methods under 25.
      Open

      class Appointment extends EloquentModel implements HasPresenter
      {
          /**
           * The attributes that are mass assignable.
           *
      Severity: Minor
      Found in src/Models/Appointment.php by phpmd

      TooManyMethods

      Since: 0.1

      A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

      By default it ignores methods starting with 'get' or 'set'.

      The default was changed from 10 to 25 in PHPMD 2.3.

      Example

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

      The class Appointment has 28 public methods. Consider refactoring Appointment to keep number of public methods under 10.
      Open

      class Appointment extends EloquentModel implements HasPresenter
      {
          /**
           * The attributes that are mass assignable.
           *
      Severity: Minor
      Found in src/Models/Appointment.php by phpmd

      TooManyPublicMethods

      Since: 0.1

      A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

      By default it ignores methods starting with 'get' or 'set'.

      Example

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

      The class Timetable has 12 public methods. Consider refactoring Timetable to keep number of public methods under 10.
      Open

      class Timetable
      {
          /**
           * Timetable matrix.
           *
      Severity: Minor
      Found in src/Timetable/Timetable.php by phpmd

      TooManyPublicMethods

      Since: 0.1

      A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

      By default it ignores methods starting with 'get' or 'set'.

      Example

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

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

      class Appointment extends EloquentModel implements HasPresenter
      {
          /**
           * The attributes that are mass assignable.
           *
      Severity: Minor
      Found in src/Models/Appointment.php by phpmd

      The class AppointmentPresenter has 15 public methods. Consider refactoring AppointmentPresenter to keep number of public methods under 10.
      Open

      class AppointmentPresenter extends BasePresenter
      {
          protected $timezone = null;
      
          public function __construct(Appointment $resource)

      TooManyPublicMethods

      Since: 0.1

      A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

      By default it ignores methods starting with 'get' or 'set'.

      Example

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

      The class Business has 12 public methods. Consider refactoring Business to keep number of public methods under 10.
      Open

      class Business extends EloquentModel implements HasPresenter
      {
          use SoftDeletes, Preferenceable, IsIntoDomain;
      
          /**
      Severity: Minor
      Found in src/Models/Business.php by phpmd

      TooManyPublicMethods

      Since: 0.1

      A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

      By default it ignores methods starting with 'get' or 'set'.

      Example

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

      The class VacancyParser has 13 public methods. Consider refactoring VacancyParser to keep number of public methods under 10.
      Open

      class VacancyParser
      {
          const REGEX_PATTERN_VACANCY = '/(?P<services>.*)\n\ (?P<days>.*)\n\ \ (?<hours>.*)/im';
      
          /////////////////////
      Severity: Minor
      Found in src/Vacancy/VacancyParser.php by phpmd

      TooManyPublicMethods

      Since: 0.1

      A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

      By default it ignores methods starting with 'get' or 'set'.

      Example

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

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

      class Business extends EloquentModel implements HasPresenter
      {
          use SoftDeletes, Preferenceable, IsIntoDomain;
      
          /**
      Severity: Minor
      Found in src/Models/Business.php - About 2 hrs to fix

        Method takeReservation has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function takeReservation(array $request)
            {
                $issuer = $request['issuer'];
                $service = $request['service'];
                $contact = $request['contact'];
        Severity: Minor
        Found in src/Concierge.php - About 1 hr to fix

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

              public function format($format = [])
              {
                  $this->tempInterval = $this->interval;
                  $hours = $this->getHours(PHP_ROUND_HALF_DOWN);
                  $this->interval = $this->tempInterval % (1000 * 60 * 60);
          Severity: Minor
          Found in src/Duration.php - About 1 hr to fix

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

                        foreach ($dimensions['date'] as $date) {
            Severity: Minor
            Found in src/Timetable/Timetable.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 '$dimensions' which will lead to PHP notices.
            Open

                    foreach ($dimensions['service'] as $service) {
            Severity: Minor
            Found in src/Timetable/Timetable.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 '$dimensions' which will lead to PHP notices.
            Open

                    $dimensions['service'] = $this->inflateServices();
            Severity: Minor
            Found in src/Timetable/Timetable.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 '$dates' which will lead to PHP notices.
            Open

                    return $dates;
            Severity: Minor
            Found in src/Timetable/Timetable.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

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

            class Appointment extends EloquentModel implements HasPresenter
            {
                /**
                 * The attributes that are mass assignable.
                 *
            Severity: Minor
            Found in src/Models/Appointment.php by phpmd

            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

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

                            foreach ($dimensions['time'] as $time) {
            Severity: Minor
            Found in src/Timetable/Timetable.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 '$dimensions' which will lead to PHP notices.
            Open

                    $dimensions['time'] = $this->inflateTimes();
            Severity: Minor
            Found in src/Timetable/Timetable.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 '$dates' which will lead to PHP notices.
            Open

                        $dates[$date] = $date;
            Severity: Minor
            Found in src/Timetable/Timetable.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