ppshobi /
psonic
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Psonic\Commands\Search; |
||||
| 4 | |||||
| 5 | use Psonic\Commands\Command; |
||||
| 6 | |||||
| 7 | final class QueryCommand extends Command |
||||
| 8 | { |
||||
| 9 | private $command = 'QUERY'; |
||||
| 10 | private $parameters = []; |
||||
| 11 | |||||
| 12 | /** |
||||
| 13 | * QueryCommand 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
Loading history...
|
|||||
| 18 | * @param null $offset |
||||
|
0 ignored issues
–
show
|
|||||
| 19 | * @param null $locale |
||||
|
0 ignored issues
–
show
|
|||||
| 20 | */ |
||||
| 21 | public function __construct(string $collection, string $bucket, string $terms, $limit = null, $offset = null, $locale = null) |
||||
| 22 | { |
||||
| 23 | $this->parameters = [ |
||||
| 24 | 'collection' => $collection, |
||||
| 25 | 'bucket' => $bucket, |
||||
| 26 | 'terms' => self::wrapInQuotes($terms), |
||||
|
0 ignored issues
–
show
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
Loading history...
|
|||||
| 27 | 'limit' => $limit ? "LIMIT($limit)": null, |
||||
|
0 ignored issues
–
show
|
|||||
| 28 | 'offset' => $offset ? "OFFSET($offset)": null, |
||||
|
0 ignored issues
–
show
|
|||||
| 29 | 'locale' => $locale ? "LANG($locale)": null, |
||||
|
0 ignored issues
–
show
|
|||||
| 30 | ]; |
||||
| 31 | |||||
| 32 | parent::__construct($this->command, $this->parameters); |
||||
| 33 | } |
||||
| 34 | } |
||||
| 35 |