Completed
Push — master ( 82b45c...643174 )
by Leo
02:15
created

BaseBot::getApiWrapper()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace leocata\m1Bot\Bot;
4
5
use leocata\M1\Api;
6
use leocata\M1\Authorization;
7
8
abstract class BaseBot
9
{
10
    public $pass;
11
    public $username;
12
    private $auth;
13
    private $apiWrapper;
14
15
    final public function __construct()
16
    {
17
        $this->auth = new Authorization($this->username, $this->pass);
18
        $this->apiWrapper = new Api();
19
        $this->apiWrapper->setAuth($this->auth);
20
    }
21
22
    public function getAuth()
23
    {
24
        return $this->auth;
25
    }
26
27
    public function contactAccepted(\GearmanJob $job)
0 ignored issues
show
Bug introduced by
The type GearmanJob was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
28
    {
29
        $job->sendComplete(true);
30
    }
31
32
    public function contactRejected(\GearmanJob $job)
33
    {
34
        $job->sendComplete(true);
35
    }
36
37
    public function contactRequested(\GearmanJob $job)
38
    {
39
        $job->sendComplete(true);
40
    }
41
42
    public function delivery(\GearmanJob $job)
43
    {
44
        $job->sendComplete(true);
45
    }
46
47
    public function message(\GearmanJob $job)
48
    {
49
        $job->sendComplete(true);
50
    }
51
52
    public function messageDeleted(\GearmanJob $job)
53
    {
54
        $job->sendComplete(true);
55
    }
56
57
    public function read(\GearmanJob $job)
58
    {
59
        $job->sendComplete(true);
60
    }
61
62
    public function state(\GearmanJob $job)
63
    {
64
        $job->sendComplete(true);
65
    }
66
67
    public function typing(\GearmanJob $job)
68
    {
69
        $job->sendComplete(true);
70
    }
71
72
    /**
73
     * @return Api
74
     */
75
    public function getApiWrapper(): Api
76
    {
77
        return $this->apiWrapper;
78
    }
79
}
80