Completed
Push — master ( 479a33...82b45c )
by Leo
01:42
created

MessageEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 1
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace leocata\m1Bot\Events;
4
5
use leocata\M1\Api;
6
7
class MessageEvent
8
{
9
    private $method;
10
11
    /**
12
     * MessageEvent constructor.
13
     * @param $message
14
     */
15
    final public function __construct($message)
16
    {
17
        $apiWrapper = new Api();
18
        $client = new \GearmanClient();
0 ignored issues
show
Bug introduced by
The type GearmanClient 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...
19
        $client->addServer();
20
        $this->method = $apiWrapper->getCallbackMethod($message);
21
        $methodName = lcfirst($this->method->getMethodName());
22
        $client->doHighBackground($methodName, \GuzzleHttp\json_encode($this->method));
23
    }
24
}
25