for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
require __DIR__ . '/../vendor/autoload.php';
use erjanmx\nambaone\Client;
use erjanmx\nambaone\EventsHandler;
use erjanmx\nambaone\ClientException;
/**
* @class
*/
class CustomEventsHandler extends EventsHandler
{
public $events = [
'message/new' => 'messageNew',
];
public function messageNew($data)
$this->client->to($data['chat_id'])->setType($data['type'])->setContent($data['content'])->send();
to()
erjanmx\nambaone\Client
__call
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$this->client->/** @scrutinizer ignore-call */
to($data['chat_id'])->setType($data['type'])->setContent($data['content'])->send();
}
$API_KEY = '';
try {
$client = new Client($API_KEY, new CustomEventsHandler());
$client->handleEvents();
} catch (ClientException $e) {
//handle exception