EvilFreelancer/bookeo-api-php

View on GitHub

Showing 17 of 19 total issues

Method all has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function all(
        int $itemsPerPage = 50,
        string $pageNavigationToken = null,
        int $pageNumber = 1,
        string $startTime = null,
Severity: Minor
Found in src/Endpoints/Bookings.php - About 1 hr to fix

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

            int $itemsPerPage = 50,
            string $pageNavigationToken = null,
            int $pageNumber = 1,
            string $startTime = null,
            string $endTime = null,
    Severity: Major
    Found in src/Endpoints/Bookings.php - About 1 hr to fix

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

          public function allowed(): array
          {
              return [
                  'bookingNumber'               => 'string',             // The unique booking number. Always treat as string [read-only],
                  'eventId'                     => 'string',             // When the booking is for a product of type fixed or fixedCourse, this is the id of the slot (see /availability/slots). Note that for fixedCourse, Bookeo always returns the eventId of the first class in a course, even if the customer is enrolled starting from a later class. In this case, firstCourseEnrolledEvent will be set.,
      Severity: Minor
      Found in src/Models/Booking.php - About 1 hr to fix

        Function all has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            public function all(
                int $itemsPerPage = 50,
                string $pageNavigationToken = null,
                int $pageNumber = 1,
                string $startTime = null,
        Severity: Minor
        Found in src/Endpoints/Bookings.php - About 1 hr 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 __invoke has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            public function __invoke(
                string $productId = null,
                string $startTime = null,
                string $endTime = null,
                int $itemsPerPage = 50,
        Severity: Minor
        Found in src/Endpoints/Availability/Slots.php - About 1 hr 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 all has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function all(
                string $searchText = null,
                string $searchField = null,
                string $createdSince = null,
                bool $currentMembers = true,
        Severity: Minor
        Found in src/Endpoints/Customers.php - About 1 hr to fix

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

              public function __invoke(
                  string $productId = null,
                  string $startTime = null,
                  string $endTime = null,
                  int $itemsPerPage = 50,
          Severity: Minor
          Found in src/Endpoints/Availability/Slots.php - About 1 hr to fix

            Method all has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    string $searchText = null,
                    string $searchField = null,
                    string $createdSince = null,
                    bool $currentMembers = true,
                    bool $currentNonMembers = true,
            Severity: Major
            Found in src/Endpoints/Customers.php - About 1 hr to fix

              Function repeatRequest has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  private function repeatRequest($type, $url, $params): ?ResponseInterface
                  {
                      $type = strtoupper($type);
              
                      for ($i = 1; $i < $this->config->get('tries'); $i++) {
              Severity: Minor
              Found in src/HttpTrait.php - About 55 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 create has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      Booking $create,
                      string $previousHoldId = null,
                      bool $notifyUsers = null,
                      bool $notifyCustomer = null,
                      bool $sendCustomerReminders = null,
              Severity: Major
              Found in src/Endpoints/Bookings.php - About 50 mins to fix

                Method __invoke has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        string $productId = null,
                        string $startTime = null,
                        string $endTime = null,
                        int $itemsPerPage = 50,
                        string $pageNavigationToken = null,
                Severity: Minor
                Found in src/Endpoints/Availability/Slots.php - About 45 mins to fix

                  Method delete has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          bool $notifyUsers = null,
                          bool $notifyCustomer = null,
                          bool $applyCancellationPolicy = null,
                          bool $trackInCustomerHistory = null,
                          bool $cancelRemainingSeries = null,
                  Severity: Minor
                  Found in src/Endpoints/Bookings.php - About 45 mins to fix

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

                        public function all(
                            string $searchText = null,
                            string $searchField = null,
                            string $createdSince = null,
                            bool $currentMembers = true,
                    Severity: Minor
                    Found in src/Endpoints/Customers.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 bookings has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            string $beginDate = null,
                            string $endDate = null,
                            bool $expandParticipants = false,
                            int $itemsPerPage = 50,
                            string $pageNavigationToken = null,
                    Severity: Minor
                    Found in src/Endpoints/Customers.php - About 45 mins to fix

                      Function delete has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function delete(
                              bool $notifyUsers = null,
                              bool $notifyCustomer = null,
                              bool $applyCancellationPolicy = null,
                              bool $trackInCustomerHistory = null,
                      Severity: Minor
                      Found in src/Endpoints/Bookings.php - About 25 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 create has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function create(
                              Booking $create,
                              string $previousHoldId = null,
                              bool $notifyUsers = null,
                              bool $notifyCustomer = null,
                      Severity: Minor
                      Found in src/Endpoints/Bookings.php - About 25 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 bookings has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function bookings(
                              string $beginDate = null,
                              string $endDate = null,
                              bool $expandParticipants = false,
                              int $itemsPerPage = 50,
                      Severity: Minor
                      Found in src/Endpoints/Customers.php - About 25 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