Issues (4)

examples/get-domain-info.php (1 issue)

Labels
Severity
1
<?php
2
3
use Level23\Dynadot\DynadotApi;
4
use Monolog\Logger;
5
6
7
require '../vendor/autoload.php';
8
9
$apiKey = file_get_contents('.key');
10
11
// Create the logger
12
$logger = new Logger('my_logger');
13
14
$logger->pushHandler(new \Monolog\Handler\ErrorLogHandler());
15
$logger->addInfo('Key: ' . $apiKey);
0 ignored issues
show
The method addInfo() does not exist on Monolog\Logger. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

15
$logger->/** @scrutinizer ignore-call */ 
16
         addInfo('Key: ' . $apiKey);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
16
17
try {
18
    $api = new DynadotApi($apiKey, $logger);
19
    print_r($api->getDomainInfo('example.com'));
20
} catch (Exception $e) {
21
    echo $e->getMessage();
22
}
23