Completed
Push — develop ( 335c93...e4583a )
by Mohamed
12:58
created

Controller::sidebarProjects()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 10
ccs 0
cts 5
cp 0
rs 9.4285
cc 2
eloc 5
nc 2
nop 0
crap 6
1
<?php
2
3
/*
4
 * This file is part of the Tinyissue package.
5
 *
6
 * (c) Mohamed Alsharaf <[email protected]>
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 Tinyissue\Http\Controllers;
13
14
use Illuminate\Foundation\Bus\DispatchesJobs;
15
use Illuminate\Routing\Controller as BaseController;
16
use Illuminate\Foundation\Validation\ValidatesRequests;
17
use Illuminate\Contracts\Auth\Guard;
18
use Tinyissue\Model;
19
20
/**
21
 * Controller is an abstract class for the controller classes.
22
 *
23
 * @author Mohamed Alsharaf <[email protected]>
24
 */
25
abstract class Controller extends BaseController
26
{
27
    use DispatchesJobs, ValidatesRequests;
28
29
    /**
30
     * Current logged in user.
31
     *
32
     * @var Guard
33
     */
34
    protected $auth;
35
36
    /**
37
     * Constructor, inject an instance of logged user.
38
     *
39
     * @param \Illuminate\Contracts\Auth\Guard $auth
40
     */
41 56
    public function __construct(Guard $auth)
42
    {
43 56
        $this->auth = $auth;
44 56
    }
45
}
46