herpaderpaldent/seat-groups

View on GitHub
src/Models/SeatGroup.php

Summary

Maintainability
B
4 hrs
Test Coverage

Showing 3 of 3 total issues

Function isQualified has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

public function isQualified(Group $group)
{
 
$action = new GetCurrentAffiliationAction;
 
 
Severity: Minor
Found in src/Models/SeatGroup.php - About 3 hrs to fix

Function isManager has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

public function isManager(Group $group)
{
 
if (in_array($group->id, $this->manager->pluck('id')->toArray()))
return true;
Severity: Minor
Found in src/Models/SeatGroup.php - About 35 mins to fix

Avoid too many return statements within this method.
Open

return false;
Severity: Major
Found in src/Models/SeatGroup.php - About 30 mins to fix
    Category
    Status