biurad/flange

View on GitHub

Showing 181 of 185 total issues

File RoutingExtension.php has 285 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php declare(strict_types=1);

/*
 * This file is part of Biurad opensource projects.
 *
Severity: Minor
Found in src/Extensions/RoutingExtension.php - About 2 hrs to fix

    Method createHasher has 71 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function createHasher(array $config): array
        {
            if ($config['migrate_from'] ?? false) {
                return $config;
            }
    Severity: Major
    Found in src/Extensions/Security/SecurityExtension.php - About 2 hrs to fix

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

          protected function execute(InputInterface $input, OutputInterface $output): int
          {
              $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
      
              if (!$this->debug) {
      Severity: Minor
      Found in src/Commands/ServerCommand.php - About 2 hrs 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

      Function getEntitiesByIds has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getEntitiesByIds(string $identifier, array $values): array
          {
              if (null !== $this->queryBuilder->getMaxResults() || 0 < (int) $this->queryBuilder->getFirstResult()) {
                  // an offset or a limit would apply on results including the where clause with submitted id values
                  // that could make invalid choices valid
      Severity: Minor
      Found in src/Database/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php - About 2 hrs 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

      Function runBlockingServer has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
      Open

          private function runBlockingServer(SymfonyStyle $io, InputInterface $input, OutputInterface $output): int
          {
              $callback = null;
              $disableOutput = false;
      
      
      Severity: Minor
      Found in src/Commands/ServerCommand.php - About 2 hrs 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

      File ServerCommand.php has 281 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php declare(strict_types=1);
      
      /*
       * This file is part of Biurad opensource projects.
       *
      Severity: Minor
      Found in src/Commands/ServerCommand.php - About 2 hrs to fix

        File DatabaseExtension.php has 281 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php declare(strict_types=1);
        
        /*
         * This file is part of Biurad opensource projects.
         *
        Severity: Minor
        Found in src/Extensions/Doctrine/DatabaseExtension.php - About 2 hrs to fix

          Method boot has 68 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function boot(Container $container): void
              {
                  $router = $container->definition('http.router');
                  $collection = $container->parameters['routes'] ?? null;
                  $routes = $groups = $defaultMiddlewares = $middlewares = $pipesMiddleware = [];
          Severity: Major
          Found in src/Extensions/RoutingExtension.php - About 2 hrs to fix

            Function register has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

                public function register(Container $container, array $configs = []): void
                {
                    if (!$configs['enabled']) {
                        return;
                    }
            Severity: Minor
            Found in src/Extensions/Symfony/MailerExtension.php - About 2 hrs 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

            Function createHasher has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

                private function createHasher(array $config): array
                {
                    if ($config['migrate_from'] ?? false) {
                        return $config;
                    }
            Severity: Minor
            Found in src/Extensions/Security/SecurityExtension.php - About 2 hrs 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 getConfigTreeBuilder has 64 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getConfigTreeBuilder(): TreeBuilder
                {
                    $treeBuilder = new TreeBuilder(__CLASS__);
            
                    $treeBuilder->getRootNode()
            Severity: Major
            Found in src/Extensions/Symfony/TranslationExtension.php - About 2 hrs to fix

              Method register has 63 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function register(Container $container, array $configs = []): void
                  {
                      if (!$configs['enabled']) {
                          return;
                      }
              Severity: Major
              Found in src/Extensions/Symfony/MailerExtension.php - About 2 hrs to fix

                File ValidatorExtension.php has 270 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php declare(strict_types=1);
                
                /*
                 * This file is part of Biurad opensource projects.
                 *
                Severity: Minor
                Found in src/Extensions/Symfony/ValidatorExtension.php - About 2 hrs to fix

                  Method getConfigNode has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function getConfigNode(): ArrayNodeDefinition
                      {
                          $root = new NodeBuilder();
                  
                          return $root
                  Severity: Major
                  Found in src/Extensions/Config/HttpClientRetrySection.php - About 2 hrs to fix

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

                        protected function execute(InputInterface $input, OutputInterface $output): int
                        {
                            $io = new SymfonyStyle($input, $output);
                    
                            if (!$this->migrator->isConfigured()) {
                    Severity: Minor
                    Found in src/Commands/CycleORM/DatabaseMigrateCommand.php - About 2 hrs 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

                    Function loadModules has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function loadModules(string $moduleDir, string $prefix = null, string $configName = 'config'): void
                        {
                            // Get list modules available in application
                            foreach (\scandir($moduleDir) as $directory) {
                                if ('.' === $directory || '..' === $directory) {
                    Severity: Minor
                    Found in src/Traits/HelperTrait.php - About 2 hrs 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 getConfigTreeBuilder has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getConfigTreeBuilder(): TreeBuilder
                        {
                            $treeBuilder = new TreeBuilder(__CLASS__);
                    
                            $treeBuilder->getRootNode()
                    Severity: Major
                    Found in src/Extensions/Symfony/RateLimiterExtension.php - About 2 hrs to fix

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

                          public function getConfigTreeBuilder(): TreeBuilder
                          {
                              $treeBuilder = new TreeBuilder(__CLASS__);
                      
                              $treeBuilder->getRootNode()
                      Severity: Major
                      Found in src/Extensions/CycleORM/DatabaseExtension.php - About 2 hrs to fix

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

                            protected function execute(InputInterface $input, OutputInterface $output): int
                            {
                                $io = new SymfonyStyle($input, $output);
                        
                                if (!$this->migrator->isConfigured()) {
                        Severity: Major
                        Found in src/Commands/CycleORM/DatabaseMigrateCommand.php - About 2 hrs to fix

                          Method execute has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              protected function execute(InputInterface $input, OutputInterface $output): int
                              {
                                  $io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
                          
                                  if (!$this->debug) {
                          Severity: Major
                          Found in src/Commands/ServerCommand.php - About 2 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language