Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Pull Request — master (#46)
by Cristian
02:23 queued 01:03
created

MenuItemCrudController::update()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Backpack\MenuCRUD\app\Http\Controllers\Admin;
4
5
use Backpack\CRUD\app\Http\Controllers\CrudController;
6
7
class MenuItemCrudController extends CrudController
8
{
9
    use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation;
10
    use \Backpack\CRUD\app\Http\Controllers\Operations\CreateOperation;
11
    use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation;
12
    use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation;
13
    use \Backpack\CRUD\app\Http\Controllers\Operations\ReorderOperation;
14
15
    public function setup()
16
    {
17
        $this->crud->setModel("Backpack\MenuCRUD\app\Models\MenuItem");
18
        $this->crud->setRoute(config('backpack.base.route_prefix').'/menu-item');
19
        $this->crud->setEntityNameStrings('menu item', 'menu items');
20
21
        $this->crud->enableReorder('name', 3);
22
23
        $this->crud->operation('list', function () {
0 ignored issues
show
Bug introduced by
The method operation() does not exist on Backpack\CRUD\CrudPanel. Did you maybe mean doingListOperation()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
24
            $this->crud->addColumn([
25
                'name' => 'name',
26
                'label' => 'Label',
27
            ]);
28
            $this->crud->addColumn([
29
                'label' => 'Parent',
30
                'type' => 'select',
31
                'name' => 'parent_id',
32
                'entity' => 'parent',
33
                'attribute' => 'name',
34
                'model' => "\Backpack\MenuCRUD\app\Models\MenuItem",
35
            ]);
36
        });
37
38
        $this->crud->operation(['create', 'update'], function () {
0 ignored issues
show
Bug introduced by
The method operation() does not exist on Backpack\CRUD\CrudPanel. Did you maybe mean doingListOperation()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
39
            $this->crud->addField([
40
                'name' => 'name',
41
                'label' => 'Label',
42
            ]);
43
            $this->crud->addField([
44
                'label' => 'Parent',
45
                'type' => 'select',
46
                'name' => 'parent_id',
47
                'entity' => 'parent',
48
                'attribute' => 'name',
49
                'model' => "\Backpack\MenuCRUD\app\Models\MenuItem",
50
            ]);
51
            $this->crud->addField([
52
                'name' => 'type',
53
                'label' => 'Type',
54
                'type' => 'page_or_link',
55
                'page_model' => '\Backpack\PageManager\app\Models\Page',
56
            ]);
57
        });
58
    }
59
}
60