for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Trait BaseIndexTrait|Firesphere\ElasticSearch\Traits\BaseIndexTrait Used to extract methods from the
* {@link \Firesphere\ElasticSearch\Indexes\ElasticIndex} to make the code more readable
*
* @package Firesphere\Elastic\Search
* @author Simon `Firesphere` Erkelens; Marco `Sheepy` Hermo
* @copyright Copyright (c) 2018 - now() Firesphere & Sheepy
*/
namespace Firesphere\ElasticSearch\Traits\IndexTraits;
* Trait ElasticIndexTrait
* Getters and Setters for the ElasticIndex
trait BaseIndexTrait
{
* @var array Fulltext fields
protected $fulltextFields = [];
* @var array Filterable fields
protected $filterFields = [];
* Add a single Fulltext field
* @param string $fulltextField
* @param array $options
* @return $this
public function addFulltextField($fulltextField, $options = []): self
$options
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function addFulltextField($fulltextField, /** @scrutinizer ignore-unused */ $options = []): self
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$this->fulltextFields[] = $fulltextField;
return $this;
}
* Add a filterable field
* Compatibility stub for Solr
* @param $filterField
public function addFilterField($filterField): self
$this->filterFields[] = $filterField;
$this->addFulltextField($filterField);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.