Completed
Push — master ( 591ed3...b89cbf )
by Phecho
04:38
created

Http/Controllers/Dashboard/ProjectController.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/*
4
 * This file is part of Jitamin.
5
 *
6
 * Copyright (C) Jitamin Team
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Jitamin\Http\Controllers\Dashboard;
13
14
use Jitamin\Http\Controllers\Controller;
15
16
/**
17
 * Project Controller.
18
 */
19
class ProjectController extends Controller
20
{
21
    /**
22
     * Project overview.
23
     */
24 View Code Duplication
    public function index()
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
25
    {
26
        $user = $this->getUser();
27
28
        $this->response->html($this->helper->layout->dashboard('dashboard/project/index', [
29
            'title'             => t('Dashboard'),
30
            'paginator'         => $this->projectPagination->getDashboardPaginator($user['id'], 'index', 10),
31
            'user'              => $user,
32
        ]));
33
    }
34
35
    /**
36
     * Starred projects.
37
     */
38 View Code Duplication
    public function starred()
39
    {
40
        $user = $this->getUser();
41
42
        $this->response->html($this->helper->layout->dashboard('dashboard/project/starred', [
43
            'title'             => t('Starred projects'),
44
            'paginator'         => $this->starPagination->getDashboardPaginator($user['id'], 'stars', 10),
45
            'user'              => $user,
46
        ]));
47
    }
48
}
49