Code Duplication    Length = 19-19 lines in 4 locations

app/Http/Controllers/Projects/GraphsController.php 1 location

@@ 18-36 (lines=19) @@
15
use Gitamin\Models\Project;
16
use Illuminate\Support\Facades\View;
17
18
class GraphsController extends Controller
19
{
20
    protected $active_item = 'graphs';
21
22
    /**
23
     * Display a listing of the resource.
24
     *
25
     * @return \Illuminate\Http\Response
26
     */
27
    public function indexAction($namespace, $project_path)
28
    {
29
        $project = Project::findByPath($namespace, $project_path);
30
31
        return View::make('projects.graphs.index')
32
            ->withProject($project)
33
            ->withWikis([])
34
            ->withActiveItem($this->active_item)
35
            ->withPageTitle(sprintf('%s - %s', trans('dashboard.issues.issues'), $project->name));
36
    }
37
}
38

app/Http/Controllers/Projects/PullRequestsController.php 1 location

@@ 18-36 (lines=19) @@
15
use Gitamin\Models\Project;
16
use Illuminate\Support\Facades\View;
17
18
class PullRequestsController extends Controller
19
{
20
    protected $active_item = 'pulls';
21
22
    /**
23
     * Display a listing of the resource.
24
     *
25
     * @return \Illuminate\Http\Response
26
     */
27
    public function indexAction($namespace, $project_path)
28
    {
29
        $project = Project::findByPath($namespace, $project_path);
30
31
        return View::make('projects.pulls.index')
32
            ->withProject($project)
33
            ->withPullRequests([])
34
            ->withActiveItem($this->active_item)
35
            ->withPageTitle(sprintf('%s - %s', trans('dashboard.issues.issues'), $project->name));
36
    }
37
}
38

app/Http/Controllers/Projects/PulseController.php 1 location

@@ 18-36 (lines=19) @@
15
use Gitamin\Models\Project;
16
use Illuminate\Support\Facades\View;
17
18
class PulseController extends Controller
19
{
20
    protected $active_item = 'pulse';
21
22
    /**
23
     * Display a listing of the resource.
24
     *
25
     * @return \Illuminate\Http\Response
26
     */
27
    public function indexAction($namespace, $project_path)
28
    {
29
        $project = Project::findByPath($namespace, $project_path);
30
31
        return View::make('projects.pulse.index')
32
            ->withProject($project)
33
            ->withWikis([])
34
            ->withActiveItem($this->active_item)
35
            ->withPageTitle(sprintf('%s - %s', trans('dashboard.issues.issues'), $project->name));
36
    }
37
}
38

app/Http/Controllers/Projects/WikiController.php 1 location

@@ 18-36 (lines=19) @@
15
use Gitamin\Models\Project;
16
use Illuminate\Support\Facades\View;
17
18
class WikiController extends Controller
19
{
20
    protected $active_item = 'wiki';
21
22
    /**
23
     * Display a listing of the resource.
24
     *
25
     * @return \Illuminate\Http\Response
26
     */
27
    public function indexAction($namespace, $project_path)
28
    {
29
        $project = Project::findByPath($namespace, $project_path);
30
31
        return View::make('projects.wiki.index')
32
            ->withProject($project)
33
            ->withWikis([])
34
            ->withActiveItem($this->active_item)
35
            ->withPageTitle(sprintf('%s - %s', trans('dashboard.issues.issues'), $project->name));
36
    }
37
}
38