Passed
Push — master ( 51edae...d29a9b )
by Curtis
11:52 queued 05:54
created

Organize   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 7
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 5 1
1
<?php
2
3
namespace App\Http\Controllers\enso\Menus;
4
5
use Illuminate\Http\Request;
6
use Illuminate\Routing\Controller;
7
use App\Service\enso\menus\Organizer;
8
9
class Organize extends Controller
10
{
11
    public function __invoke(Request $request)
12
    {
13
        (new Organizer($request->get('menus')))->handle();
0 ignored issues
show
Bug introduced by
It seems like $request->get('menus') can also be of type null; however, parameter $menus of App\Service\enso\menus\Organizer::__construct() does only seem to accept array, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

13
        (new Organizer(/** @scrutinizer ignore-type */ $request->get('menus')))->handle();
Loading history...
14
15
        return ['message' => __('The menu order has been sucessfully updated')];
16
    }
17
}
18