Completed
Push — dev ( 459fc5...4267f3 )
by Marc
02:14
created

HomeController::home()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
1
<?php namespace Mascame\Artificer\Controllers;
2
3
use Mascame\Artificer\Options\AdminOption;
4
use Redirect;
5
6
class HomeController extends BaseController
7
{
8
9
    public function home()
10
    {
11
        $hiddenModels = AdminOption::get('model.hidden');
12
13
        $nonHiddenModels = array_diff(array_keys($this->modelObject->schema->models), $hiddenModels);
14
15
        $firstModel = head($nonHiddenModels);
16
17
        return Redirect::route('admin.model.all',
0 ignored issues
show
Bug introduced by
The method route() does not seem to exist on object<redirect>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
18
            array('slug' => $this->modelObject->schema->models[$firstModel]['route']));
19
    }
20
21
}
22