| Total Complexity | 12 |
| Total Lines | 70 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 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); |
||
|
|
|||
| 30 | } |
||
| 31 | |||
| 32 | public function contactRejected(\GearmanJob $job) |
||
| 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 |
||
| 78 | } |
||
| 79 | } |
||
| 80 |