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) |
||||
28 | { |
||||
29 | $job->sendComplete(true); |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||
30 | } |
||||
31 | |||||
32 | public function contactRejected(\GearmanJob $job) |
||||
33 | { |
||||
34 | $job->sendComplete(true); |
||||
0 ignored issues
–
show
true of type true is incompatible with the type string expected by parameter $result of GearmanJob::sendComplete() .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
35 | } |
||||
36 | |||||
37 | public function contactRequested(\GearmanJob $job) |
||||
38 | { |
||||
39 | $job->sendComplete(true); |
||||
0 ignored issues
–
show
true of type true is incompatible with the type string expected by parameter $result of GearmanJob::sendComplete() .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
40 | } |
||||
41 | |||||
42 | public function delivery(\GearmanJob $job) |
||||
43 | { |
||||
44 | $job->sendComplete(true); |
||||
0 ignored issues
–
show
true of type true is incompatible with the type string expected by parameter $result of GearmanJob::sendComplete() .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
45 | } |
||||
46 | |||||
47 | public function message(\GearmanJob $job) |
||||
48 | { |
||||
49 | $job->sendComplete(true); |
||||
0 ignored issues
–
show
true of type true is incompatible with the type string expected by parameter $result of GearmanJob::sendComplete() .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
50 | } |
||||
51 | |||||
52 | public function messageDeleted(\GearmanJob $job) |
||||
53 | { |
||||
54 | $job->sendComplete(true); |
||||
0 ignored issues
–
show
true of type true is incompatible with the type string expected by parameter $result of GearmanJob::sendComplete() .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
55 | } |
||||
56 | |||||
57 | public function read(\GearmanJob $job) |
||||
58 | { |
||||
59 | $job->sendComplete(true); |
||||
0 ignored issues
–
show
true of type true is incompatible with the type string expected by parameter $result of GearmanJob::sendComplete() .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
60 | } |
||||
61 | |||||
62 | public function state(\GearmanJob $job) |
||||
63 | { |
||||
64 | $job->sendComplete(true); |
||||
0 ignored issues
–
show
true of type true is incompatible with the type string expected by parameter $result of GearmanJob::sendComplete() .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
65 | } |
||||
66 | |||||
67 | public function typing(\GearmanJob $job) |
||||
68 | { |
||||
69 | $job->sendComplete(true); |
||||
0 ignored issues
–
show
true of type true is incompatible with the type string expected by parameter $result of GearmanJob::sendComplete() .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
70 | } |
||||
71 | |||||
72 | /** |
||||
73 | * @return Api |
||||
74 | */ |
||||
75 | public function getApiWrapper(): Api |
||||
76 | { |
||||
77 | return $this->apiWrapper; |
||||
78 | } |
||||
79 | } |
||||
80 |