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.

Issues (1)

src/ChannelLogger.php (1 issue)

Labels
Severity
1
<?php declare(strict_types=1);
2
3
namespace WyriHaximus\React\PSR3\Bunny;
4
5
use Bunny\Channel;
6
use Psr\Log\AbstractLogger;
7
use function WyriHaximus\PSR3\checkCorrectLogLevel;
8
use function WyriHaximus\PSR3\normalizeContext;
9
use function WyriHaximus\PSR3\processPlaceHolders;
10
11
final class ChannelLogger extends AbstractLogger
12
{
13
    /**
14
     * @var Channel
15
     */
16
    private $channel;
17
18
    /**
19
     * @var array
20
     */
21
    private $publishArguments;
22
23
    /**
24
     * @param Channel $channel
25
     * @param array   $publishArguments
26
     */
27 14
    public function __construct(Channel $channel, ...$publishArguments)
28
    {
29 14
        $this->channel = $channel;
30 14
        $this->publishArguments = $publishArguments;
31 14
    }
32
33 13
    public function log($level, $message, array $context = [])
34
    {
35 13
        checkCorrectLogLevel($level);
36 12
        $context = normalizeContext($context);
37 12
        $message = (string)$message;
38 12
        $message = processPlaceHolders($message, $context);
39 12
        $json = json_encode([
40 12
            'level' => $level,
41 12
            'message' => $message,
42 12
            'context' => $context,
43
        ]);
44 12
        $this->channel->publish($json, ...$this->publishArguments);
0 ignored issues
show
$this->publishArguments is expanded, but the parameter $headers of Bunny\Channel::publish() does not expect variable arguments. ( Ignorable by Annotation )

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

44
        $this->channel->publish($json, /** @scrutinizer ignore-type */ ...$this->publishArguments);
Loading history...
45 12
    }
46
}
47