RebelCode/rcmod-eddbk-rest-api

View on GitHub

Showing 28 of 87 total issues

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

    public function setup()
    {
        return $this->_setupContainer(
            $this->_loadPhpConfigFile(RCMOD_EDDBK_REST_API_CONFIG_FILE),
            [
Severity: Major
Found in src/Module/EddBkRestApiModule.php - About 2 days to fix

    File EddBkRestApiModule.php has 500 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace RebelCode\EddBookings\RestApi\Module;
    
    use ArrayIterator;
    Severity: Minor
    Found in src/Module/EddBkRestApiModule.php - About 1 day to fix

      File BookingsController.php has 381 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      namespace RebelCode\EddBookings\RestApi\Controller;
      
      use Dhii\Data\Container\ContainerSetCapableTrait;
      Severity: Minor
      Found in src/Controller/BookingsController.php - About 5 hrs to fix

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

            protected function _getUpdateParamFieldMapping()
            {
                return [
                    'start'    => [
                        'field'     => 'start',
        Severity: Major
        Found in src/Controller/BookingsController.php - About 2 hrs to fix

          AbstractBaseCqrsController has 24 functions (exceeds 20 allowed). Consider refactoring.
          Open

          abstract class AbstractBaseCqrsController extends AbstractBaseController implements ControllerInterface
          {
              /* @since [*next-version*] */
              use ContainerGetCapableTrait;
          
          
          Severity: Minor
          Found in src/Controller/AbstractBaseCqrsController.php - About 2 hrs to fix

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

                protected function _getAvailabilityRuleMapConfig()
                {
                    return [
                        [
                            MapTransformer::K_SOURCE => 'id',
            Severity: Major
            Found in src/Transformer/AvailabilityRuleTransformer.php - About 2 hrs to fix

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

                  protected function _getServiceDataParamMapping()
                  {
                      return [
                          'id' => [
                              'field' => 'id',
              Severity: Major
              Found in src/Controller/ServicesController.php - About 2 hrs to fix

                File AbstractBaseCqrsController.php has 251 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                
                namespace RebelCode\EddBookings\RestApi\Controller;
                
                use ArrayAccess;
                Severity: Minor
                Found in src/Controller/AbstractBaseCqrsController.php - About 2 hrs to fix

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

                      protected function _getSelectConditionParamMapping()
                      {
                          return [
                              'id'       => [
                                  'compare' => 'eq',
                  Severity: Minor
                  Found in src/Controller/BookingsController.php - About 1 hr to fix

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

                        protected function _getBookingMapConfig()
                        {
                            return [
                                [
                                    MapTransformer::K_SOURCE => 'id',
                    Severity: Minor
                    Found in src/Transformer/BookingTransformer.php - About 1 hr to fix

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

                          protected function _getInsertParamFieldMapping()
                          {
                              return [
                                  'start'    => [
                                      'field'     => 'start',
                      Severity: Minor
                      Found in src/Controller/BookingsController.php - About 1 hr to fix

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

                            protected function _getResourceDataParamMapping()
                            {
                                return [
                                    'id'           => [
                                        'field'     => 'id',
                        Severity: Minor
                        Found in src/Controller/ResourcesController.php - About 1 hr to fix

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

                              protected function _getServiceMapConfig()
                              {
                                  return [
                                      [
                                          MapTransformer::K_SOURCE => 'id',
                          Severity: Minor
                          Found in src/Transformer/CoreInfoServiceTransformer.php - About 1 hr to fix

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

                                protected function _getSelectConditionParamMapping()
                                {
                                    return [
                                        'id' => [
                                            'compare' => 'eq',
                            Severity: Minor
                            Found in src/Controller/SessionsController.php - About 1 hr to fix

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

                                  protected function _post($params = [])
                                  {
                                      // Create state-aware booking from params
                                      $booking = $this->stateAwareFactory->make([
                                          StateAwareFactoryInterface::K_DATA => $this->_buildInsertRecord($params),
                              Severity: Minor
                              Found in src/Controller/BookingsController.php - About 1 hr to fix

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

                                    protected function _buildInsertRecord($params)
                                    {
                                        $recordData = [];
                                
                                        foreach ($this->_getInsertParamFieldMapping() as $_param => $_mapping) {
                                Severity: Minor
                                Found in src/Controller/AbstractBaseCqrsController.php - About 1 hr to fix

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

                                      protected function _patch($params = [])
                                      {
                                          try {
                                              $id = $this->_containerGet($params, 'id');
                                          } catch (NotFoundExceptionInterface $exception) {
                                  Severity: Minor
                                  Found in src/Controller/BookingsController.php - About 1 hr to fix

                                    Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            $key,
                                            $dependencies,
                                            $configFactory,
                                            $containerFactory,
                                            $compContainerFactory,
                                    Severity: Major
                                    Found in src/Module/EddBkRestApiModule.php - About 50 mins to fix

                                      Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                              FactoryInterface $iteratorFactory,
                                              StateAwareFactoryInterface $bookingFactory,
                                              TransitionerInterface $bookingTransitioner,
                                              SelectCapableInterface $selectRm,
                                              EntityManagerInterface $entityManager,
                                      Severity: Major
                                      Found in src/Controller/BookingsController.php - About 50 mins to fix

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

                                                $iteratorFactory,
                                                $selectRm,
                                                $ordering,
                                                $exprBuilder,
                                                $defaultNumPerPage,
                                        Severity: Minor
                                        Found in src/Controller/SessionsController.php - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language