symfony-doge/veslo

View on GitHub

Showing 47 of 47 total issues

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

    public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode    = $treeBuilder->root('veslo_app');

Severity: Major
Found in src/AppBundle/DependencyInjection/Configuration.php - About 2 hrs to fix

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

        public function load(array $configs, ContainerBuilder $container)
        {
            $locator = new FileLocator(__DIR__ . implode(DIRECTORY_SEPARATOR, ['', '..', 'Resources']));
            $loader  = new YamlFileLoader($container, $locator);
    
    
    Severity: Major
    Found in src/AnthillBundle/DependencyInjection/VesloAnthillExtension.php - About 2 hrs to fix

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

          private function getHttpProxyNode(): ArrayNodeDefinition
          {
              $treeBuilder = new TreeBuilder();
              $node        = $treeBuilder->root('proxy');
      
      
      Severity: Minor
      Found in src/AppBundle/DependencyInjection/Configuration.php - About 1 hr to fix

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

        <?php
        
        /*
         * This file is part of the Veslo project <https://github.com/symfony-doge/veslo>.
         *
        src/AnthillBundle/DependencyInjection/Compiler/VacancyRoadmapPass.php on lines 1..46

        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 115.

        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
        
        /*
         * This file is part of the Veslo project <https://github.com/symfony-doge/veslo>.
         *
        src/AnthillBundle/DependencyInjection/Compiler/VacancyScannerPass.php on lines 1..46

        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 115.

        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
        
        /*
         * This file is part of the Veslo project <https://github.com/symfony-doge/veslo>.
         *
        src/AppBundle/Exception/Workflow/Conveyor/ConnectionFailedException.php on lines 1..58

        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 112.

        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
        
        /*
         * This file is part of the Veslo project <https://github.com/symfony-doge/veslo>.
         *
        src/AnthillBundle/Exception/Vacancy/Scanner/Strategy/FetchFailedException.php on lines 1..57

        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 112.

        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

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

            public function load(array $configs, ContainerBuilder $container)
            {
                $locator = new FileLocator(__DIR__ . implode(DIRECTORY_SEPARATOR, ['', '..', 'Resources']));
                $loader  = new YamlFileLoader($container, $locator);
        
        
        Severity: Minor
        Found in src/AppBundle/DependencyInjection/VesloAppExtension.php - About 1 hr to fix

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

              public function listArchive(int $page): Response
              {
                  $pagination = $this->vacancyArchive->read($page);
          
                  $messageVacanciesNotFound = $this->translator->trans('vacancies_are_not_found');
          Severity: Major
          Found in src/AnthillBundle/Controller/VacancyController.php and 1 other location - About 1 hr to fix
          src/AnthillBundle/Controller/VacancyController.php on lines 99..120

          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 109.

          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 list(int $page): Response
              {
                  $pagination = $this->vacancyJournal->read($page);
          
                  $messageVacanciesNotFound = $this->translator->trans('fresh_vacancies_are_not_found');
          Severity: Major
          Found in src/AnthillBundle/Controller/VacancyController.php and 1 other location - About 1 hr to fix
          src/AnthillBundle/Controller/VacancyController.php on lines 162..183

          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 109.

          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

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

              private function collectIteration(PitInterface $pit): bool
              {
                  $sourceName = get_class($pit);
          
                  /** @var ParsedDto $scanResult */
          Severity: Minor
          Found in src/AnthillBundle/Vacancy/Collector/AntWorker.php - About 1 hr to fix

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

                private function appendTo(ItemInterface $root, Category $category): ItemInterface
                {
                    $categoryName = $category->getName();
            
                    $categoryMenuItemOptions = [
            Severity: Minor
            Found in src/AnthillBundle/Menu/Vacancy/CategoriesBuilder.php - About 1 hr to fix

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

                  private function iAmCurious(HeadHunterParameters $parameters, int $page = 0): array
                  {
                      $uri   = $parameters->getUrl();
                      $query = [
                          'text'      => $parameters->getText(),

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

                    public function __construct(VacancyRepository $vacancyRepository, array $options)
                    {
                        $this->vacancyRepository = $vacancyRepository;
                
                        $optionsResolver = new OptionsResolver();
                Severity: Major
                Found in src/AnthillBundle/Vacancy/Provider/Journal.php and 1 other location - About 1 hr to fix
                src/AnthillBundle/Vacancy/Provider/Archive.php on lines 51..66

                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 102.

                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

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

                    public function getConfigTreeBuilder()
                    {
                        $treeBuilder = new TreeBuilder();
                        $rootNode    = $treeBuilder->root('veslo_sanity');
                
                
                Severity: Minor
                Found in src/SanityBundle/DependencyInjection/Configuration.php - About 1 hr to fix

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

                      public function load(array $configs, ContainerBuilder $container)
                      {
                          $locator = new FileLocator(__DIR__ . implode(DIRECTORY_SEPARATOR, ['', '..', 'Resources']));
                          $loader  = new YamlFileLoader($container, $locator);
                  
                  
                  Severity: Minor
                  Found in src/SanityBundle/DependencyInjection/VesloSanityExtension.php - About 1 hr to fix

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

                        private function getAmqpClientNode(): ArrayNodeDefinition
                        {
                            $treeBuilder = new TreeBuilder();
                            $node        = $treeBuilder->root('amqp_client');
                    
                    
                    Severity: Minor
                    Found in src/AppBundle/DependencyInjection/Configuration.php - About 1 hr to fix

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

                          public function __construct(VacancyRepository $vacancyRepository, array $options)
                          {
                              $this->vacancyRepository = $vacancyRepository;
                      
                              $optionsResolver = new OptionsResolver();
                      Severity: Major
                      Found in src/AnthillBundle/Vacancy/Provider/Archive.php and 1 other location - About 1 hr to fix
                      src/AnthillBundle/Vacancy/Provider/Journal.php on lines 52..67

                      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 102.

                      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

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

                          private function distribute(Payload $payload, array $queueNames): void
                          {
                              $this->ensureConnection();
                      
                              $channel = $this->amqpClient->channel();
                      Severity: Minor
                      Found in src/AppBundle/Workflow/Vacancy/Research/Conveyor.php - About 1 hr to fix

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

                            private function deliverIteration(PitInterface $pit): bool
                            {
                                $sourceName = get_class($pit);
                        
                                /** @var AcceptanceDto $acceptance */
                        Severity: Minor
                        Found in src/SanityBundle/Vacancy/Indexer/Cockroach.php - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language