stingus/StingusJiraBundle

View on GitHub

Showing 6 of 23 total issues

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

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln('<info>Generate private / public keys for JIRA</info>');

        $countryQuestion = new Question('Enter the country name (eg. US): ');
Severity: Major
Found in Command/GenerateCertCommand.php - About 3 hrs to fix

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

        public function callbackAction(Request $request): RedirectResponse
        {
            try {
                $oauthToken = null;
                if ($this->has('stingus_jira.oauth_token_manager')) {
    Severity: Minor
    Found in Controller/OauthController.php - About 1 hr to fix

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

          public function connectAction(Request $request): RedirectResponse
          {
              $tokenId = $request->query->get('tokenId');
              $consumerKey = $request->query->get('consumerKey');
              $baseUrl = $request->query->get('baseUrl');
      Severity: Minor
      Found in Controller/OauthController.php - About 1 hr to fix

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

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

          Function callbackAction has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function callbackAction(Request $request): RedirectResponse
              {
                  try {
                      $oauthToken = null;
                      if ($this->has('stingus_jira.oauth_token_manager')) {
          Severity: Minor
          Found in Controller/OauthController.php - About 55 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 connectAction has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              public function connectAction(Request $request): RedirectResponse
              {
                  $tokenId = $request->query->get('tokenId');
                  $consumerKey = $request->query->get('consumerKey');
                  $baseUrl = $request->query->get('baseUrl');
          Severity: Minor
          Found in Controller/OauthController.php - About 25 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