Completed
Push — feature/manager_view_app_profi... ( 5ff349...1f9820 )
by Tristan
06:53
created

DateLocale   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 14
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 5 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace App\Http\Middleware;
4
5
use Closure;
6
use Jenssegers\Date\Date;
7
8
class DateLocale
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class DateLocale
Loading history...
9
{
10
    /**
11
     * Handle an incoming request.
12
     *
13
     * @param  \Illuminate\Http\Request  $request
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter type; 2 found
Loading history...
14
     * @param  \Closure  $next
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 17 spaces after parameter type; 2 found
Loading history...
15
     * @return mixed
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
16
     */
17
    public function handle($request, Closure $next)
18
    {
19
        Date::setLocale(app()->getLocale());
0 ignored issues
show
introduced by
The method getLocale() does not exist on Illuminate\Container\Container. Are you sure you never get this type here, but always one of the subclasses? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
        Date::setLocale(app()->/** @scrutinizer ignore-call */ getLocale());
Loading history...
20
        
21
        return $next($request);
22
    }
23
}
24