Function isQualified
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
public function isQualified(Group $group)
{
$action = new GetCurrentAffiliationAction;
Function update
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
public function update(Request $request, $id)
{
$seatgroup = SeatGroup::find($id);
Method update
has 46 lines of code (exceeds 25 allowed). Consider refactoring.
public function update(Request $request, $id)
{
$seatgroup = SeatGroup::find($id);
Method execute
has 36 lines of code (exceeds 25 allowed). Consider refactoring.
public function execute(array $data)
{
$seatgroup = SeatGroup::find($data['seatgroup_id']);
$affiliations = collect();
Method handle
has 32 lines of code (exceeds 25 allowed). Consider refactoring.
public function handle(GroupApplication $event)
{
$should_send = false;
if (class_exists(SeatNotificationsServiceProvider::class))
Method up
has 30 lines of code (exceeds 25 allowed). Consider refactoring.
public function up()
{
Schema::create('seatgroups', function ($table) {
$table->increments('id')->index();
$table->string('name');
Method execute
has 28 lines of code (exceeds 25 allowed). Consider refactoring.
public function execute(Group $group)
{
$this->group = $group;
$main_character = $this->get_main_character_action->execute($this->group);
$this->has_missing_refresh_token = false;
Function mergeConfigs
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
protected function mergeConfigs(array $original, array $merging)
{
$array = array_merge($original, $merging);
foreach ($original as $key => $value) {
Method execute
has 27 lines of code (exceeds 25 allowed). Consider refactoring.
public function execute(Group $group) : Collection
{
$this->group = $group;
Method handle
has 26 lines of code (exceeds 25 allowed). Consider refactoring.
public function handle(GroupSynced $event)
{
if (empty($event->sync['attached']) && empty($event->sync['detached']))
$this->delete();
Function execute
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
public function execute(array $data)
{
$seatgroup = SeatGroup::find($data['seatgroup_id']);
if(isset($data['groups'])){
Function isManager
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
public function isManager(Group $group)
{
if (in_array($group->id, $this->manager->pluck('id')->toArray()))
return true;
Function execute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
public function execute(Group $group)
{
$this->group = $group;
$main_character = $this->get_main_character_action->execute($this->group);
$this->has_missing_refresh_token = false;
Avoid too many return
statements within this method.
return false;
Avoid too many return
statements within this method.
return redirect()->back()->with('success', 'Updated');
Avoid too many return
statements within this method.
return false;
Avoid too many return
statements within this method.
return redirect()->back()->with('warning', 'ups something went wrong');
Function execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
public function execute(Group $group)
{
$this->group = $group;
Function destroy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
public function destroy($id)
{
$seatgroup = SeatGroup::find($id);
if ($seatgroup->type == 'open') {
Function handle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
public function handle(GroupSynced $event)
{
$should_send = false;
if (! empty($event->sync['attached']))