Passed
Push — master ( 184cb3...5f1713 )
by Waaaaaaaaaa
02:19
created

example.php (4 issues)

Labels
Severity
1
<?php
2
3
require __DIR__ . '/vendor/autoload.php';
4
5
$logfile = new Logfile\Logfile('92193684-b2a9-84ca-cd07-d1631a3813d2');
6
$logfile->setPath(__DIR__);
0 ignored issues
show
The method setPath() does not exist on Logfile\Logfile. ( Ignorable by Annotation )

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

6
$logfile->/** @scrutinizer ignore-call */ 
7
          setPath(__DIR__);

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...
7
$logfile->setUser(['id' => '4']);
0 ignored issues
show
The method setUser() does not exist on Logfile\Logfile. ( Ignorable by Annotation )

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

7
$logfile->/** @scrutinizer ignore-call */ 
8
          setUser(['id' => '4']);

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...
8
$logfile->setTags([
0 ignored issues
show
The method setTags() does not exist on Logfile\Logfile. ( Ignorable by Annotation )

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

8
$logfile->/** @scrutinizer ignore-call */ 
9
          setTags([

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...
9
    'env' => $_SERVER,
10
]);
11
$logfile->setRelease(exec('git log --pretty="%H" -n1 HEAD'));
0 ignored issues
show
The method setRelease() does not exist on Logfile\Logfile. ( Ignorable by Annotation )

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

11
$logfile->/** @scrutinizer ignore-call */ 
12
          setRelease(exec('git log --pretty="%H" -n1 HEAD'));

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...
12
13
$handler = new Logfile\MonologHandler($logfile);
14
15
$logger = new Monolog\Logger('debug');
16
$logger->pushHandler($handler);
17
18
// --------
19
20
set_exception_handler(function (Throwable $e) use($logfile, $logger) {
21
    $logfile->captureException($e);
22
    $logger->error($e->getMessage(), ['exception' => $e]);
23
});
24
25
function fail() {
26
    throw new ErrorException('whoops');
27
}
28
29
fail();
30