Test Setup Failed
Push — master ( f0f097...c6f3d6 )
by Php Easy Api
04:31
created

AuthUserManager::allDeviceTokens()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 5
rs 10
c 1
b 1
f 0
1
<?php
2
3
namespace Resta\Authenticate\Resource;
4
5
use Resta\Authenticate\AuthenticateProvider;
6
7
class AuthUserManager extends ResourceManager
8
{
9
    /**
10
     * AuthUserManager constructor.
11
     * @param $deviceTokenId
12
     * @param AuthenticateProvider $auth
13
     */
14
    public function __construct($deviceTokenId,$auth)
15
    {
16
        parent::__construct($auth);
17
        
18
        $this->auth->params['userId'] = $deviceTokenId['user_id'];
19
    }
20
21
    /**
22
     * get all device tokens for user
23
     * 
24
     * @return void|mixed
25
     */
26
    public function allDeviceTokens()
27
    {
28
        // Finally, we attempt to login the user by running
29
        // the login method of the builder object.
30
        return $this->driverBuilderInstance->allDeviceTokens($this);
0 ignored issues
show
Bug introduced by
The method allDeviceTokens() does not exist on null. ( Ignorable by Annotation )

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

30
        return $this->driverBuilderInstance->/** @scrutinizer ignore-call */ allDeviceTokens($this);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
31
    }
32
33
    /**
34
     * get user process
35
     * 
36
     * @return void|mixed
37
     */
38
    public function userProcess()
39
    {
40
        // Finally, we attempt to login the user by running
41
        // the login method of the builder object.
42
        return $this->driverBuilderInstance->userProcess($this);
43
    }
44
}