GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( b864c9...ed9166 )
by butschster
12:41
created

DisplayColumnController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 32
c 0
b 0
f 0
ccs 0
cts 12
cp 0
rs 10
wmc 2
lcom 0
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A orderUp() 0 8 1
A orderDown() 0 8 1
1
<?php
2
3
namespace SleepingOwl\Admin\Http\Controllers;
4
5
use Illuminate\Routing\Controller;
6
use SleepingOwl\Admin\Traits\OrderableModel;
7
use SleepingOwl\Admin\Contracts\ModelConfigurationInterface;
8
9
class DisplayColumnController extends Controller
10
{
11
    /**
12
     * @param ModelConfigurationInterface $model
13
     * @param int $id
14
     *
15
     * @return \Illuminate\Http\RedirectResponse
16
     */
17
    public function orderUp(ModelConfigurationInterface $model, $id)
18
    {
19
        /** @var OrderableModel $instance */
20
        $instance = $model->getRepository()->find($id);
21
        $instance->moveUp();
22
23
        return back();
24
    }
25
26
    /**
27
     * @param ModelConfigurationInterface $model
28
     * @param int $id
29
     *
30
     * @return \Illuminate\Http\RedirectResponse
31
     */
32
    public function orderDown(ModelConfigurationInterface $model, $id)
33
    {
34
        /** @var OrderableModel $instance */
35
        $instance = $model->getRepository()->find($id);
36
        $instance->moveDown();
37
38
        return back();
39
    }
40
}
41