AOEpeople/StackFormation

View on GitHub
src/AwsInspector/Command/Ec2/TerminateCommand.php

Summary

Maintainability
D
2 days
Test Coverage

Showing 3 of 3 total issues

Function interact has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

protected function interact(InputInterface $input, OutputInterface $output)
{
$instance = $input->getArgument('instance');
if (empty($instance)) {
// find instances based on tag(s)
Severity: Minor
Found in src/AwsInspector/Command/Ec2/TerminateCommand.php - About 4 hrs to fix

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

protected function interact(InputInterface $input, OutputInterface $output)
{
$instance = $input->getArgument('instance');
if (empty($instance)) {
// find instances based on tag(s)
Severity: Minor
Found in src/AwsInspector/Command/Ec2/TerminateCommand.php - About 2 hrs to fix

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    if (empty($instance)) {
    // find instances based on tag(s)
    $tags = $input->getOption('tag');
    $tags = $this->convertTags($tags);
     
     
    Severity: Major
    Found in src/AwsInspector/Command/Ec2/TerminateCommand.php and 1 other location - About 2 days to fix
    src/AwsInspector/Command/Ec2/SshCommand.php on lines 63..115
    Category
    Status