AOEpeople/StackFormation

View on GitHub
src/AwsInspector/Command/CloudwatchLogs/TailCommand.php

Summary

Maintainability
C
7 hrs
Test Coverage

Showing 4 of 4 total issues

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

protected function interact(InputInterface $input, OutputInterface $output)
{
$logGroupName = $input->getArgument('group') ?: '*';
 
$repository = new Repository();
Severity: Minor
Found in src/AwsInspector/Command/CloudwatchLogs/TailCommand.php - About 1 hr to fix

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

    protected function interact(InputInterface $input, OutputInterface $output)
    {
    $logGroupName = $input->getArgument('group') ?: '*';
     
    $repository = new Repository();
    Severity: Minor
    Found in src/AwsInspector/Command/CloudwatchLogs/TailCommand.php - About 55 mins to fix

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

    if (count($streams) == 0) {
    throw new \InvalidArgumentException('Could not find any matching log streams');
    } elseif (count($streams) == 1) {
    $logStreamName = $streams->getFirst()->getLogStreamName();
    } else {
    Severity: Major
    Found in src/AwsInspector/Command/CloudwatchLogs/TailCommand.php and 1 other location - About 2 hrs to fix
    src/AwsInspector/Command/CloudwatchLogs/TailCommand.php on lines 38..48

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

    if (count($groups) == 0) {
    throw new \InvalidArgumentException('Could not find any matching log groups');
    } elseif (count($groups) == 1) {
    $logGroupName = $groups->getFirst()->getLogGroupName();
    } else {
    Severity: Major
    Found in src/AwsInspector/Command/CloudwatchLogs/TailCommand.php and 1 other location - About 2 hrs to fix
    src/AwsInspector/Command/CloudwatchLogs/TailCommand.php on lines 57..67

    There are no issues that match your filters.

    Category
    Status