symfony-doge/veslo

View on GitHub

Showing 23 of 47 total issues

File config.php has 384 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/*
 * ************** CAUTION **************
 *
Severity: Minor
Found in web/config.php - About 5 hrs to fix

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

        public function getConfigTreeBuilder()
        {
            $treeBuilder = new TreeBuilder();
            $rootNode    = $treeBuilder->root('veslo_anthill');
    
    
    Severity: Major
    Found in src/AnthillBundle/DependencyInjection/Configuration.php - About 3 hrs to fix

      RawDto has 26 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class RawDto
      {
          /**
           * Vacancy URL
           *
      Severity: Minor
      Found in src/AnthillBundle/Dto/Vacancy/RawDto.php - About 3 hrs to fix

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

        class HeadHunter implements ParametersInterface
        {
            /**
             * DateTime format
             *

          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

                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

                  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(),

                        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

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

                                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

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

                                      public function execute(PitInterface $source, int $iterations): int
                                      {
                                          $iterationRemains = max(1, $iterations);
                                          $iterationSuccess = 0;
                                          $iterationClosure = $this->iteration;
                                  Severity: Minor
                                  Found in src/AppBundle/Workflow/Vacancy/Worker/Iteration/Loop.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 __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          LoggerInterface $logger,
                                          VacancyRepository $vacancyRepository,
                                          AnalyserInterface $vacancyAnalyser,
                                          IndexCreator $sanityIndexCreator,
                                          NormalizerInterface $sanityIndexNormalizer
                                  Severity: Minor
                                  Found in src/SanityBundle/Vacancy/Indexer/Cockroach.php - About 35 mins to fix

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

                                            EngineInterface $templateEngine,
                                            Journal $vacancyJournal,
                                            Archive $vacancyArchive,
                                            IndexRepository $indexRepository,
                                            TranslatorInterface $translator
                                    Severity: Minor
                                    Found in src/AnthillBundle/Controller/VacancyController.php - About 35 mins to fix

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

                                              ClientInterface $motClient,
                                              CredentialsStorageInterface $credentialsStorage,
                                              DataConverter $dataConverter,
                                              AdapterInterface $cache,
                                              array $options
                                      Severity: Minor
                                      Found in src/SanityBundle/Vacancy/Tag/Group/Provider/MinistryOfTruth.php - About 35 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language