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.

SuggestCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 9
dl 0
loc 22
rs 10
c 2
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 2
1
<?php
2
3
namespace Psonic\Commands\Search;
4
5
use Psonic\Commands\Command;
6
7
final class SuggestCommand extends Command
8
{
9
    private $command    = 'SUGGEST';
10
    private $parameters = [];
11
12
    /**
13
     * SuggestCommand constructor.
14
     * @param string $collection
15
     * @param string $bucket
16
     * @param string $terms
17
     * @param null $limit
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $limit is correct as it would always require null to be passed?
Loading history...
18
     */
19
    public function __construct(string $collection, string $bucket, string $terms, $limit = null)
20
    {
21
        $this->parameters = [
22
            'collection' => $collection,
23
            'bucket'     => $bucket,
24
            'terms'      => self::wrapInQuotes($terms),
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

24
            'terms'      => self::/** @scrutinizer ignore-call */ wrapInQuotes($terms),
Loading history...
25
            'limit'      => $limit ? "LIMIT($limit)" : null,
0 ignored issues
show
introduced by
$limit is of type null, thus it always evaluated to false.
Loading history...
26
        ];
27
28
        parent::__construct($this->command, $this->parameters);
29
    }
30
}