Covivo/mobicoop

View on GitHub

Showing 157 of 1,619 total issues

PublicProfile has 21 functions (exceeds 20 allowed). Consider refactoring.
Open

class PublicProfile
{
    const SMOKE_NO = 0;
    const SMOKE_NOT_IN_CAR = 1;
    const SMOKE = 2;
Severity: Minor
Found in api/src/User/Ressource/PublicProfile.php - About 2 hrs to fix

    Avoid deeply nested control flow statements.
    Open

                                        if (is_null($ask->getCriteria()->getMonTime())) {
                                            break;
                                        }
    Severity: Major
    Found in api/src/Carpool/Service/ProofManager.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                  if (!$ad->isOneWay()) {
                                      $returnProposal = $this->proposalManager->prepareProposal($this->proposalManager->get($outwardProposal->getProposalLinked()->getId()));
                                      $this->matchingRepository->linkRelatedMatchings($outwardProposal->getId());
                                  }
      Severity: Major
      Found in api/src/DataFixtures/BasicFixtures.php - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                            if (is_null($ask->getCriteria()->getThuTime())) {
                                                break;
                                            }
        Severity: Major
        Found in api/src/Carpool/Service/ProofManager.php - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if ('' !== $tab[$i]) {
                                      $massPerson->{$setter}($tab[$i]);
                                  }
          Severity: Major
          Found in api/src/Match/Service/MassImportManager.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                                if (is_null($ask->getCriteria()->getTueTime())) {
                                                    break;
                                                }
            Severity: Major
            Found in api/src/Carpool/Service/ProofManager.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                                  if (is_null($ask->getCriteria()->getWedTime())) {
                                                      break;
                                                  }
              Severity: Major
              Found in api/src/Carpool/Service/ProofManager.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if (method_exists($personalAddress, $setter)) {
                                            $personalAddress->{$setter}(strtoupper($tab[$i]));
                                        }
                Severity: Major
                Found in api/src/Match/Service/MassImportManager.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                      if (is_null($ask->getCriteria()->getFriTime())) {
                                                          break;
                                                      }
                  Severity: Major
                  Found in api/src/Carpool/Service/ProofManager.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if (                                    // 1.2.2. First journey validation after published deadline
                                                $this->isDateAfterPublishedDeadline($this->_today)
                                            ) {
                                                $this->_version = self::EEC_VERSION_IMPROVED;
                                            }
                    Severity: Major
                    Found in api/src/Incentive/Entity/SubscriptionVersion.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                          if (is_null($ask->getCriteria()->getSunTime())) {
                                                              break;
                                                          }
                      Severity: Major
                      Found in api/src/Carpool/Service/ProofManager.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if (                                    // 1.2.1. Ld first journey realised after the published deadline
                                                    $this->isDateAfterPublishedDeadline($this->_currentCommitmentJourney->getInitialProposal()->getCriteria()->getFromDate())
                                                ) {
                                                    $this->_version = self::EEC_VERSION_IMPROVED;
                                                }
                        Severity: Major
                        Found in api/src/Incentive/Entity/SubscriptionVersion.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if (                                    // 1.2.1. Ld first journey realised before the published deadline
                                                      $this->isDateBeforePublishedDeadline($this->_currentCommitmentJourney->getInitialProposal()->getCriteria()->getFromDate())
                                                  ) {
                                                      $this->_version = self::EEC_VERSION_STANDARD;
                                                  }
                          Severity: Major
                          Found in api/src/Incentive/Entity/SubscriptionVersion.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                                if (is_null($ask->getCriteria()->getSatTime())) {
                                                                    break;
                                                                }
                            Severity: Major
                            Found in api/src/Carpool/Service/ProofManager.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if (                                    // 1.2.1. First journey validation before published deadline
                                                          $this->isDateAfterPublishedDeadline($this->_today)
                                                      ) {
                                                          $this->_version = self::EEC_VERSION_STANDARD;
                                                      }
                              Severity: Major
                              Found in api/src/Incentive/Entity/SubscriptionVersion.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                            if (Ad::ROLE_DRIVER_OR_PASSENGER == $ad->getRole()) {
                                                                // linking for the outward
                                                                $this->matchingRepository->linkOppositeMatchings($outwardProposal->getId());
                                                                if (!$ad->isOneWay()) {
                                                                    // linking for the return
                                Severity: Major
                                Found in api/src/DataFixtures/BasicFixtures.php - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          if (method_exists($workAddress, $setter)) {
                                                              $workAddress->{$setter}(strtoupper($tab[$i]));
                                                          }
                                  Severity: Major
                                  Found in api/src/Match/Service/MassImportManager.php - About 45 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language