Issues (4)

examples/list-domains.php (1 issue)

Labels
Severity
1
<?php
2
3
use Level23\Dynadot\DynadotApi;
4
use Monolog\Logger;
5
6
require '../vendor/autoload.php';
7
8
$apiKey = file_get_contents('.key');
9
10
// Create the logger
11
$logger = new Logger('my_logger');
12
13
$logger->pushHandler(new \Monolog\Handler\ErrorLogHandler());
14
$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

14
$logger->/** @scrutinizer ignore-call */ 
15
         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...
15
16
try {
17
    $api = new DynadotApi($apiKey, $logger);
18
    $list = $api->getDomainList();
19
20
    print_r( $list );
21
} catch (Exception $e) {
22
    echo $e->getMessage();
23
    echo "<br>";
24
    echo $e->getTraceAsString();
25
}
26