vaened /
laravel-searcher
| 1 | <?php |
||||||
| 2 | /** |
||||||
| 3 | * Created by enea dhack - 13/06/2020 13:01. |
||||||
| 4 | */ |
||||||
| 5 | |||||||
| 6 | namespace Vaened\Searcher; |
||||||
| 7 | |||||||
| 8 | trait WithIndexes |
||||||
| 9 | { |
||||||
| 10 | abstract protected function getIndexProvider(): Indexable; |
||||||
| 11 | |||||||
| 12 | public function search(string $index, ?string $q): self |
||||||
| 13 | { |
||||||
| 14 | if ($q != null) { |
||||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||||
| 15 | $this->apply($this->getIndexProvider()->getConstraint($index, $q)); |
||||||
|
0 ignored issues
–
show
It seems like
apply() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 16 | } |
||||||
| 17 | |||||||
| 18 | return $this; |
||||||
| 19 | } |
||||||
| 20 | } |
||||||
| 21 |