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.

PushCommand::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 11
rs 10
cc 2
nc 2
nop 5
1
<?php
2
3
namespace Psonic\Commands\Ingest;
4
5
use Psonic\Commands\Command;
6
7
final class PushCommand extends Command
8
{
9
    private $command    = 'PUSH';
10
    private $parameters = [];
11
12
    /**
13
     * Push a text/object into an object/bucket respectively
14
     * PushCommand constructor.
15
     * @param string $collection
16
     * @param string $bucket
17
     * @param string $object
18
     * @param string $text
19
     * @param string $locale - a Valid ISO 639-3 locale (eng = English), if set to `none` lexing will be disabled
20
     */
21
    public function __construct(string $collection, string $bucket, string $object, string $text, string $locale=null)
22
    {
23
        $this->parameters = [
24
            'collection' => $collection,
25
            'bucket'     => $bucket,
26
            'object'     => $object,
27
            'text'       => self::wrapInQuotes($text),
0 ignored issues
show
Bug Best Practice introduced by
The method Psonic\Commands\Command::wrapInQuotes() is not static, but was called statically. ( Ignorable by Annotation )

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

27
            'text'       => self::/** @scrutinizer ignore-call */ wrapInQuotes($text),
Loading history...
28
            'locale'     => $locale ? "LANG($locale)": null,
29
        ];
30
31
        parent::__construct($this->command, $this->parameters);
32
    }
33
}