stingus/StingusJiraBundle

View on GitHub

Showing 23 of 23 total issues

Avoid assigning values to variables in if clauses and the like (line '82', column '30').
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 by phpmd

The method execute() has 106 lines of code. Current threshold is set to 100. Avoid really long methods.
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: Minor
Found in Command/GenerateCertCommand.php by phpmd

The method callbackAction uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

} else {
$this->addFlash(
'error',
$this->get('translator')->trans('jira.errors.general', [], 'StingusJiraBundle')
);
Severity: Minor
Found in Controller/OauthController.php by phpmd
Severity
Category
Status
Source
Language