Test Failed
Push — master ( f6c91d...7200d2 )
by Gianluca
16:47
created

ShopUserController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
eloc 24
c 1
b 0
f 1
dl 0
loc 26
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A page() 0 24 1
1
<?php
2
namespace Mongi\Mongicommerce\Http\Controllers\shop;
3
use Illuminate\Support\Facades\Auth;
4
use Mongi\Mongicommerce\Http\Controllers\Controller;
5
6
class ShopUserController extends Controller
7
{
8
    public function page(){
9
        $user = Auth::user();
10
        $piva = $user->piva;
0 ignored issues
show
Bug introduced by
Accessing piva on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
11
        $rag_soc = $user->company;
0 ignored issues
show
Bug introduced by
Accessing company on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
12
        $first_name = $user->first_name;
0 ignored issues
show
Bug introduced by
Accessing first_name on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
13
        $last_name = $user->last_name;
0 ignored issues
show
Bug introduced by
Accessing last_name on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
14
        $address = $user->address;
0 ignored issues
show
Bug introduced by
Accessing address on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
15
        $telephone = $user->telephone;
0 ignored issues
show
Bug introduced by
Accessing telephone on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
16
        $email_sped = $user->email;
0 ignored issues
show
Bug introduced by
Accessing email on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
17
        $floor = $user->floor;
0 ignored issues
show
Bug introduced by
Accessing floor on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
18
        $province = $user->province;
0 ignored issues
show
Bug introduced by
Accessing province on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
19
        $city = $user->city;
0 ignored issues
show
Bug introduced by
Accessing city on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
20
        $cap = $user->cap;
0 ignored issues
show
Bug introduced by
Accessing cap on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
21
        return view('mongicommerce.pages.user_settings',compact('piva',
22
            'rag_soc',
23
            'first_name',
24
            'last_name',
25
            'address',
26
            'telephone',
27
            'email_sped',
28
            'floor',
29
            'province',
30
            'city',
31
            'cap'));
32
    }
33
}
34