Showing 6 of 23 total issues
Method execute
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
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): ');
Method callbackAction
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function callbackAction(Request $request): RedirectResponse
{
try {
$oauthToken = null;
if ($this->has('stingus_jira.oauth_token_manager')) {
Method connectAction
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function connectAction(Request $request): RedirectResponse
{
$tokenId = $request->query->get('tokenId');
$consumerKey = $request->query->get('consumerKey');
$baseUrl = $request->query->get('baseUrl');
Method getConfigTreeBuilder
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('stingus_jira');
Function callbackAction
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
public function callbackAction(Request $request): RedirectResponse
{
try {
$oauthToken = null;
if ($this->has('stingus_jira.oauth_token_manager')) {
- Read upRead up
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
Open
public function connectAction(Request $request): RedirectResponse
{
$tokenId = $request->query->get('tokenId');
$consumerKey = $request->query->get('consumerKey');
$baseUrl = $request->query->get('baseUrl');
- Read upRead up
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"