Covivo/mobicoop

View on GitHub

Showing 1,612 of 1,620 total issues

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

class Animation implements MessagerInterface
{
    /**
     * @var int The id of this animation.
     */
Severity: Minor
Found in api/src/Action/Entity/Animation.php - About 2 hrs to fix

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

    class RelayPointType
    {
        /**
         * @var int The id of this relay point type.
         *
    Severity: Minor
    Found in api/src/RelayPoint/Entity/RelayPointType.php - About 2 hrs to fix

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

      class Hydra
      {
          
          /**
           * @var string $context The context of the collection.
      Severity: Minor
      Found in client/src/MobicoopBundle/JsonLD/Entity/Hydra.php - About 2 hrs to fix

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

        class Waypoint
        {
            
            /**
             * @var float Waypoint's longitude
        Severity: Minor
        Found in api/src/RdexPlus/Entity/Waypoint.php - About 2 hrs to fix

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

          class User implements ResourceInterface, \JsonSerializable
          {
              public const DEFAULT_ID = 999999999999;
          
              /**
          Severity: Minor
          Found in client/src/MobicoopBundle/CarpoolStandard/Entity/User.php - About 2 hrs to fix

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

            class App implements UserInterface, EquatableInterface
            {
                // default role
                const DEFAULT_ROLE = 1;
                
            Severity: Minor
            Found in api/src/App/Entity/App.php - About 2 hrs to fix

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              <?php
              /**
               * Copyright (c) 2024, MOBICOOP. All rights reserved.
               * This project is dual licensed under AGPL and proprietary licence.
               ***************************
              Severity: Major
              Found in api/src/Utility/Entity/CsvMaker/queries/AllJourneys.php and 1 other location - About 2 hrs to fix
              api/src/Utility/Entity/CsvMaker/queries/Journeys.php on lines 1..230

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 127.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                  public function __construct(MassPersonRepository $massPersonRepository, EntityManagerInterface $entityManager, UserPasswordEncoderInterface $encoder, AuthItemRepository $authItemRepository, UserRepository $userRepository, AdManager $adManager, EventDispatcherInterface $eventDispatcher, CommunityManager $communityManager, Security $security, ImportManager $importManager, ProposalManager $proposalManager, LoggerInterface $logger, LanguageRepository $languageRepository, array $params)
                  {
                      $this->massPersonRepository = $massPersonRepository;
                      $this->entityManager = $entityManager;
                      $this->encoder = $encoder;
              Severity: Major
              Found in api/src/Match/Service/MassMigrateManager.php and 1 other location - About 2 hrs to fix
              api/src/Gamification/Service/GamificationManager.php on lines 82..112

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 127.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                  public function __construct(
                      SequenceItemRepository $sequenceItemRepository,
                      LogRepository $logRepository,
                      BadgeRepository $badgeRepository,
                      EntityManagerInterface $entityManager,
              Severity: Major
              Found in api/src/Gamification/Service/GamificationManager.php and 1 other location - About 2 hrs to fix
              api/src/Match/Service/MassMigrateManager.php on lines 78..94

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 127.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              <?php
              /**
               * Copyright (c) 2024, MOBICOOP. All rights reserved.
               * This project is dual licensed under AGPL and proprietary licence.
               ***************************
              Severity: Major
              Found in api/src/Utility/Entity/CsvMaker/queries/Journeys.php and 1 other location - About 2 hrs to fix
              api/src/Utility/Entity/CsvMaker/queries/AllJourneys.php on lines 1..228

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 127.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                  protected function filterProperty(string $property, $value, QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null)
                  {
                      if ('solidaryCandidate' != $property) {
                          return;
                      }
              Severity: Major
              Found in api/src/User/Filter/SolidaryCandidateFilter.php and 1 other location - About 2 hrs to fix
              api/src/User/Filter/SolidaryFilter.php on lines 59..75

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 126.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                  protected function filterProperty(string $property, $value, QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null)
                  {
                      if ('solidary' != $property) {
                          return;
                      }
              Severity: Major
              Found in api/src/User/Filter/SolidaryFilter.php and 1 other location - About 2 hrs to fix
              api/src/User/Filter/SolidaryCandidateFilter.php on lines 57..73

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 126.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 6 locations. Consider refactoring.
              Open

                  public function down(Schema $schema) : void
                  {
                      // this down() migration is auto-generated, please modify it to your needs
                      $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
              
              
              Severity: Major
              Found in api/src/Migrations/Version20181009125036.php and 5 other locations - About 2 hrs to fix
              api/src/Migrations/Version20181009125036.php on lines 34..49
              api/src/Migrations/Version20190425080643.php on lines 34..49
              api/src/Migrations/Version20191118145020.php on lines 49..65
              api/src/Migrations/Version20191129101000.php on lines 13..29
              api/src/Migrations/Version20221128055211.php on lines 13..28

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 125.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 6 locations. Consider refactoring.
              Open

                  public function up(Schema $schema) : void
                  {
                      // this up() migration is auto-generated, please modify it to your needs
                      $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
              
              
              Severity: Major
              Found in api/src/Migrations/Version20221128055211.php and 5 other locations - About 2 hrs to fix
              api/src/Migrations/Version20181009125036.php on lines 34..49
              api/src/Migrations/Version20181009125036.php on lines 51..66
              api/src/Migrations/Version20190425080643.php on lines 34..49
              api/src/Migrations/Version20191118145020.php on lines 49..65
              api/src/Migrations/Version20191129101000.php on lines 13..29

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 125.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 6 locations. Consider refactoring.
              Open

                  public function up(Schema $schema) : void
                  {
                      // this up() migration is auto-generated, please modify it to your needs
                      $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
              
              
              Severity: Major
              Found in api/src/Migrations/Version20191129101000.php and 5 other locations - About 2 hrs to fix
              api/src/Migrations/Version20181009125036.php on lines 34..49
              api/src/Migrations/Version20181009125036.php on lines 51..66
              api/src/Migrations/Version20190425080643.php on lines 34..49
              api/src/Migrations/Version20191118145020.php on lines 49..65
              api/src/Migrations/Version20221128055211.php on lines 13..28

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 125.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 6 locations. Consider refactoring.
              Open

                  public function up(Schema $schema) : void
                  {
                      // this up() migration is auto-generated, please modify it to your needs
                      $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
              
              
              Severity: Major
              Found in api/src/Migrations/Version20181009125036.php and 5 other locations - About 2 hrs to fix
              api/src/Migrations/Version20181009125036.php on lines 51..66
              api/src/Migrations/Version20190425080643.php on lines 34..49
              api/src/Migrations/Version20191118145020.php on lines 49..65
              api/src/Migrations/Version20191129101000.php on lines 13..29
              api/src/Migrations/Version20221128055211.php on lines 13..28

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 125.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 6 locations. Consider refactoring.
              Open

                  public function down(Schema $schema) : void
                  {
                      // this down() migration is auto-generated, please modify it to your needs
                      $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
              
              
              Severity: Major
              Found in api/src/Migrations/Version20191118145020.php and 5 other locations - About 2 hrs to fix
              api/src/Migrations/Version20181009125036.php on lines 34..49
              api/src/Migrations/Version20181009125036.php on lines 51..66
              api/src/Migrations/Version20190425080643.php on lines 34..49
              api/src/Migrations/Version20191129101000.php on lines 13..29
              api/src/Migrations/Version20221128055211.php on lines 13..28

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 125.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 6 locations. Consider refactoring.
              Open

                  public function up(Schema $schema) : void
                  {
                      // this up() migration is auto-generated, please modify it to your needs
                      $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
              
              
              Severity: Major
              Found in api/src/Migrations/Version20190425080643.php and 5 other locations - About 2 hrs to fix
              api/src/Migrations/Version20181009125036.php on lines 34..49
              api/src/Migrations/Version20181009125036.php on lines 51..66
              api/src/Migrations/Version20191118145020.php on lines 49..65
              api/src/Migrations/Version20191129101000.php on lines 13..29
              api/src/Migrations/Version20221128055211.php on lines 13..28

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 125.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                      $strip = array("~", "`", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "=", "+", "[", "{", "]",
                          "}", "\\", "|", ";", ":", "\"", "'", "&#8216;", "&#8217;", "&#8220;", "&#8221;", "&#8211;", "&#8212;",
                          "—", "–", ",", "<", ".", ">", "/", "?");
              Severity: Major
              Found in api/src/Service/FileManager.php and 1 other location - About 2 hrs to fix
              client/src/MobicoopBundle/Journey/Service/JourneyManager.php on lines 271..273

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 125.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                      $strip = array("~", "`", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "=", "+", "[", "{", "]",
                          "}", "\\", "|", ";", ":", "\"", "'", "&#8216;", "&#8217;", "&#8220;", "&#8221;", "&#8211;", "&#8212;",
                          "—", "–", ",", "<", ".", ">", "/", "?");
              Severity: Major
              Found in client/src/MobicoopBundle/Journey/Service/JourneyManager.php and 1 other location - About 2 hrs to fix
              api/src/Service/FileManager.php on lines 46..48

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 125.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Severity
              Category
              Status
              Source
              Language