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

HomeController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 1
cbo 4
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A home() 0 11 1
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