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

Controller   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 4
Bugs 2 Features 1
Metric Value
wmc 1
c 4
b 2
f 1
lcom 0
cbo 3
dl 0
loc 21
ccs 3
cts 3
cp 1
rs 10

1 Method

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