biurad/flange

View on GitHub

Showing 181 of 185 total issues

Function register has a Cognitive Complexity of 17 (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/ValidatorExtension.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 register has a Cognitive Complexity of 17 (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/HttpClientExtension.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 register has a Cognitive Complexity of 17 (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/NotifierExtension.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 configureOptions has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function configureOptions(OptionsResolver $resolver): void
    {
        $choiceLoader = function (Options $options) {
            // Unless the choices are given explicitly, load them on demand
            if (null === $options['choices']) {
Severity: Major
Found in src/Database/Doctrine/Form/Type/DoctrineType.php - About 2 hrs to fix

    Method getConfigTreeBuilder has 53 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/TemplateExtension.php - About 2 hrs to fix

      Method addProvidersSection has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function addProvidersSection(ArrayNodeDefinition $rootNode): void
          {
              $providerNodeBuilder = $rootNode
                  ->fixXmlConfig('provider')
                  ->children()
      Severity: Major
      Found in src/Extensions/Security/SecurityExtension.php - About 2 hrs to fix

        Method getConfigTreeBuilder has 51 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/LockExtension.php - About 2 hrs to fix

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

              public function boot(Container $container): void
              {
                  if (!$container->typed(Application::class)) {
                      return;
                  }
          Severity: Minor
          Found in src/Extensions/Symfony/ConsoleExtension.php - About 2 hrs to fix

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

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

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

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

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

                    public function register(Container $container, array $configs = []): void
                    {
                        if (!\class_exists(AnnotationLoader::class)) {
                            throw new \LogicException('Annotations/Attributes support cannot be enabled as the Annotation component is not installed. Try running "composer require biurad/annotations".');
                        }
                Severity: Minor
                Found in src/Extensions/AnnotationExtension.php - About 1 hr to fix

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

                      public function getConfigTreeBuilder(): TreeBuilder
                      {
                          $treeBuilder = new TreeBuilder(__CLASS__);
                  
                          $treeBuilder->getRootNode()
                  Severity: Minor
                  Found in src/Extensions/Symfony/MailerExtension.php - About 1 hr to fix

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

                        public function getConfigTreeBuilder(): TreeBuilder
                        {
                            $treeBuilder = new TreeBuilder(__CLASS__);
                    
                            $treeBuilder->getRootNode()
                    Severity: Minor
                    Found in src/Extensions/RoutingExtension.php - About 1 hr to fix

                      Method runBlockingServer has 46 lines of code (exceeds 25 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 1 hr to fix

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

                            protected function execute(InputInterface $input, OutputInterface $output): int
                            {
                                $databases = $input->getArgument('db') ?? \array_keys($this->config->getDatabases());
                        
                                if (!\is_array($databases)) {
                        Severity: Minor
                        Found in src/Commands/CycleORM/DatabaseListCommand.php - About 1 hr to fix

                          Method getEntitiesByIds has 45 lines of code (exceeds 25 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 1 hr to fix

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

                                public function register(Container $container, array $configs = []): void
                                {
                                    if (!\interface_exists(DatabaseProviderInterface::class)) {
                                        throw new \LogicException('Cycle Database support cannot be enabled as the Database component is not installed. Try running "composer require cycle/database".');
                                    }
                            Severity: Minor
                            Found in src/Extensions/CycleORM/DatabaseExtension.php - About 1 hr to fix

                              Function boot has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function boot(Container $container): void
                                  {
                                      if (!$container->has('validator')) {
                                          return;
                                      }
                              Severity: Minor
                              Found in src/Extensions/Symfony/ValidatorExtension.php - About 1 hr 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 register has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function register(Container $container, array $configs = []): void
                                  {
                                      if (!$configs['enabled']) {
                                          return;
                                      }
                              Severity: Minor
                              Found in src/Extensions/TemplateExtension.php - About 1 hr 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 43 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getConfigTreeBuilder(): TreeBuilder
                                  {
                                      $treeBuilder = new TreeBuilder(__CLASS__);
                              
                                      $treeBuilder->getRootNode('notifier')
                              Severity: Minor
                              Found in src/Extensions/Symfony/NotifierExtension.php - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language