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\ClientException;
$API_KEY = '';
try {
$client = new Client($API_KEY);
$client->command('user/follow', function ($user) use ($client) {
$chat = $client->api->createChat($user['id']);
$client->to($chat->data->id)->send('Welcome');
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
$client->/** @scrutinizer ignore-call */
to($chat->data->id)->send('Welcome');
});
$client->command('message/new', function ($message) use ($client) {
$client->to($message['chat_id'])->setType($message['type'])->send($message['content']);
$client->handleEvents();
} catch (ClientException $e) {
//handle exception
}