wow-apps/symfony-proxybonanza

View on GitHub

Showing 12 of 16 total issues

Plan has 30 functions (exceeds 20 allowed). Consider refactoring.
Open

class Plan
{
    const TABLE_NAME = 'proxybonanza_plan';

    /**
Severity: Minor
Found in Entity/Plan.php - About 3 hrs to fix

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

        protected function execute(InputInterface $input, OutputInterface $output)
        {
            $timeStart = microtime(true);
            $listShow = 'all';
    
    
    Severity: Major
    Found in Command/ProxybonanzaListCommand.php - About 2 hrs to fix

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

          protected function execute(InputInterface $input, OutputInterface $output)
          {
              $timeStart = microtime(true);
              $listShow = 'all';
      
      
      Severity: Minor
      Found in Command/ProxybonanzaListCommand.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 getRemotePlans has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function getRemotePlans(ProxyBonanza $proxyBonanza, SymfonyStyle $symfonyStyle)
          {
      
              $symfonyStyle->section(' Getting remote data from ProxyBonanza ');
      
      
      Severity: Minor
      Found in Command/ProxybonanzaUpdateCommand.php - About 1 hr to fix

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

            protected function execute(InputInterface $input, OutputInterface $output)
            {
                $timeStart = microtime(true);
        
                /** @var ProxyBonanza $proxyBonanza */
        Severity: Minor
        Found in Command/ProxybonanzaTestCommand.php - About 1 hr to fix

          Method getRemotePacks has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getRemotePacks(\ArrayObject $pbPlans): \ArrayObject
              {
                  if (!$pbPlans->count()) {
                      throw new \InvalidArgumentException('Can\'t get ip packs for empty plans');
                  }
          Severity: Minor
          Found in Service/ProxyBonanza.php - About 1 hr to fix

            Function getRemotePacks has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getRemotePacks(\ArrayObject $pbPlans): \ArrayObject
                {
                    if (!$pbPlans->count()) {
                        throw new \InvalidArgumentException('Can\'t get ip packs for empty plans');
                    }
            Severity: Minor
            Found in Service/ProxyBonanza.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 testProxies has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
            Open

                private function testProxies(
                    ProxyBonanza $proxyBonanza,
                    \ArrayObject $pbPlans,
                    SymfonyStyle $symfonyStyle
                ) {
            Severity: Minor
            Found in Command/ProxybonanzaUpdateCommand.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 testProxies has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function testProxies(
                    ProxyBonanza $proxyBonanza,
                    \ArrayObject $pbPlans,
                    SymfonyStyle $symfonyStyle
                ) {
            Severity: Minor
            Found in Command/ProxybonanzaUpdateCommand.php - About 1 hr to fix

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

                  protected function execute(InputInterface $input, OutputInterface $output)
                  {
                      $timeStart = microtime(true);
              
                      /** @var ProxyBonanza $proxyBonanza */
              Severity: Minor
              Found in Command/ProxybonanzaTestCommand.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 insertAuthIps has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function insertAuthIps(\ArrayObject $pbPlans): bool
                  {
                      if (!$pbPlans->count()) {
                          return false;
                      }
              Severity: Minor
              Found in Repository/AuthIpsRepository.php - About 35 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

              Function insertProxies has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function insertProxies(\ArrayObject $pbPlans): bool
                  {
                      if (!$pbPlans->count()) {
                          return false;
                      }
              Severity: Minor
              Found in Repository/ProxiesRepository.php - About 35 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

              Severity
              Category
              Status
              Source
              Language