Completed
Branch develop (56ef4a)
by Mohamed
04:14
created

MiddlewareAbstract::getLoggedUser()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 10
Ratio 100 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 10
loc 10
rs 9.4285
cc 2
eloc 5
nc 2
nop 0
1
<?php
2
/*
3
 * This file is part of the site package.
4
 *
5
 * (c) Mohamed Alsharaf <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Tinyissue\Http\Middleware;
12
13
use Tinyissue\Extensions\Auth\LoggedUser;
14
use Tinyissue\Model\User;
15
use Illuminate\Contracts\Auth\Guard;
16
use Illuminate\Contracts\Foundation\Application;
17
18
/**
19
 * @author Mohamed Alsharaf <[email protected]>
20
 */
21
abstract class MiddlewareAbstract
22
{
23
    use LoggedUser;
24
25
    /**
26
     * The Guard implementation.
27
     *
28
     * @var Guard
29
     */
30
    protected $auth;
31
32
    /**
33
     * The application implementation.
34
     *
35
     * @var \Illuminate\Contracts\Foundation\Application
36
     */
37
    protected $app;
38
39
    /**
40
     * Create a new filter instance.
41
     *
42
     * @param Guard                                        $auth
43
     * @param \Illuminate\Contracts\Foundation\Application $app
44
     */
45
    public function __construct(Guard $auth, Application $app)
46
    {
47
        $this->auth = $auth;
48
        $this->app  = $app;
49
    }
50
}
51