GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Breadcrumb::handle()   A
last analyzed

Complexity

Conditions 4
Paths 3

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
c 2
b 0
f 0
dl 0
loc 13
rs 10
cc 4
nc 3
nop 1
1
<?php
2
3
namespace Honeybadger\HoneybadgerLaravel\Breadcrumbs;
4
5
use Honeybadger\HoneybadgerLaravel\Concerns\HandlesEvents;
6
use Honeybadger\HoneybadgerLaravel\HoneybadgerLaravel;
7
8
class Breadcrumb
9
{
10
    use HandlesEvents;
11
12
    /**
13
     * @var string
14
     */
15
    public $handles;
16
17
    public function handle($event)
18
    {
19
        // Doing this check again in case config was changed at runtime (also useful for tests)
20
        if (
21
            config('honeybadger.breadcrumbs.enabled', true) === false
22
            || ! in_array(static::class, config('honeybadger.breadcrumbs.automatic', HoneybadgerLaravel::DEFAULT_BREADCRUMBS))
23
        ) {
24
            return;
25
        }
26
27
        try {
28
            $this->handleEvent($event);
0 ignored issues
show
Bug introduced by
The method handleEvent() does not exist on Honeybadger\HoneybadgerL...\Breadcrumbs\Breadcrumb. Did you maybe mean handle()? ( Ignorable by Annotation )

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

28
            $this->/** @scrutinizer ignore-call */ 
29
                   handleEvent($event);

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...
29
        } catch (\Throwable $e) {
30
            // Do nothing; we shouldn't crash the user's app for this.
31
        }
32
    }
33
}
34