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

MessageEvent   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
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