Completed
Push — master ( 0c53f4...540b39 )
by Phecho
08:00 queued 04:06
created

ProfilesController::store()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of Gitamin.
5
 * 
6
 * Copyright (C) 2015-2016 The Gitamin 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 Gitamin\Http\Controllers;
13
14
use Illuminate\Support\Facades\Auth;
15
use Illuminate\Support\Facades\View;
16
use Illuminate\Http\Request;
17
use Gitamin\Http\Controllers\Controller;
18
19
class ProfilesController extends Controller
20
{
21
    /**
22
     * Array of sub-menu items.
23
     *
24
     * @var array
25
     */
26
    protected $subMenu = [];
27
28
    /**
29
     * Creates a new project controller instance.
30
     *
31
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
32
     */
33
    public function __construct()
34
    {
35
        $this->subMenu = [
36
            'profiles' => [
37
                'title'  => trans('gitamin.profiles.profiles'),
38
                'url'    => route('profile.index'),
39
                'icon'   => 'fa fa-user',
40
                'active' => false,
41
            ], 
42
            'account'   => [
43
                'title'  => trans('gitamin.profiles.account'),
44
                'url'    => route('profile.index'),
45
                'icon'   => 'fa fa-gear',
46
                'active' => false,
47
            ],
48
            'applications' => [
49
                'title'  => trans('gitamin.profiles.applications'),
50
                'url'    => route('profile.index'),
51
                'icon'   => 'fa fa-cloud',
52
                'active' => false,
53
            ],
54
            'emails' => [
55
                'title'  => trans('gitamin.profiles.emails'),
56
                'url'    => route('profile.index'),
57
                'icon'   => 'fa fa-envelope-o',
58
                'active' => false,
59
            ],
60
            'password' => [
61
                'title'  => trans('gitamin.profiles.password'),
62
                'url'    => route('profile.index'),
63
                'icon'   => 'fa fa-lock',
64
                'active' => false,
65
            ],
66
            'notifications' => [
67
                'title'  => trans('gitamin.profiles.notifications'),
68
                'url'    => route('profile.index'),
69
                'icon'   => 'fa fa-inbox',
70
                'active' => false,
71
            ],
72
            'ssh_keys' => [
73
                'title'  => trans('gitamin.profiles.ssh_keys'),
74
                'url'    => route('profile.index'),
75
                'icon'   => 'fa fa-key',
76
                'active' => false,
77
            ],
78
            'preferences' => [
79
                'title'  => trans('gitamin.profiles.preferences'),
80
                'url'    => route('profile.index'),
81
                'icon'   => 'fa fa-image',
82
                'active' => false,
83
            ],
84
            'audit_log' => [
85
                'title'  => trans('gitamin.profiles.audit_log'),
86
                'url'    => route('profile.index'),
87
                'icon'   => 'fa fa-history',
88
                'active' => false,
89
            ],
90
        ];
91
92
        View::share([
93
            'sub_menu'  => $this->subMenu,
94
            'sub_title' => trans_choice('dashboard.projects.projects', 2),
95
        ]);
96
    }
97
98
    /**
99
     * Display a listing of the resource.
100
     *
101
     * @return \Illuminate\Http\Response
102
     */
103
    public function indexAction()
104
    {
105
        //
106
        $this->subMenu['profiles']['active'] = true;
107
        return View::make('profiles.index')
108
            ->withSubMenu($this->subMenu)
109
            ->withPageTitle(trans('gitamin.profiles.profiles').' - '.trans('dashboard.dashboard'));
110
    }
111
112
    /**
113
     * Show the form for creating a new resource.
114
     *
115
     * @return \Illuminate\Http\Response
116
     */
117
    public function create()
118
    {
119
        //
120
    }
121
122
    /**
123
     * Store a newly created resource in storage.
124
     *
125
     * @param  \Illuminate\Http\Request  $request
126
     * @return \Illuminate\Http\Response
127
     */
128
    public function store(Request $request)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
129
    {
130
        //
131
    }
132
133
    /**
134
     * Display the specified resource.
135
     *
136
     * @param  int  $id
137
     * @return \Illuminate\Http\Response
138
     */
139
    public function show($id)
0 ignored issues
show
Unused Code introduced by
The parameter $id is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
140
    {
141
        //
142
    }
143
144
    /**
145
     * Show the form for editing the specified resource.
146
     *
147
     * @param  int  $id
148
     * @return \Illuminate\Http\Response
149
     */
150
    public function edit($id)
0 ignored issues
show
Unused Code introduced by
The parameter $id is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
151
    {
152
        //
153
    }
154
155
    /**
156
     * Update the specified resource in storage.
157
     *
158
     * @param  \Illuminate\Http\Request  $request
159
     * @param  int  $id
160
     * @return \Illuminate\Http\Response
161
     */
162
    public function update(Request $request, $id)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $id is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
163
    {
164
        //
165
    }
166
167
    /**
168
     * Remove the specified resource from storage.
169
     *
170
     * @param  int  $id
171
     * @return \Illuminate\Http\Response
172
     */
173
    public function destroy($id)
0 ignored issues
show
Unused Code introduced by
The parameter $id is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
174
    {
175
        //
176
    }
177
}
178