1 | <?php |
||
10 | trait MultiauthActions |
||
11 | { |
||
12 | use MakesHttpRequests, InteractsWithConsole; |
||
13 | |||
14 | /** |
||
15 | * The route to generate the access token. The default value is the standard |
||
16 | * route from Laravel\Passport. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $oauthTokenRoute = 'oauth/token'; |
||
21 | |||
22 | public function setUp() |
||
28 | |||
29 | /** |
||
30 | * Set the the Authorization header with an access token created using |
||
31 | * Laravel Passport. |
||
32 | * |
||
33 | * @todo Change way to issue token from $this->json() to creating accessing |
||
34 | * AccessTokenController@issueToken directly. |
||
35 | * @todo Pass this method to PassportMultiauth::actingAs(). |
||
36 | * |
||
37 | * @param \Illuminate\Contracts\Auth\Authenticatable $user |
||
38 | * @param string $scope |
||
39 | * @return $this |
||
40 | */ |
||
41 | public function multiauthActingAs(Authenticatable $user, $scope = '') |
||
75 | } |
||
76 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: