Commit 6ef9821f authored by borisson_'s avatar borisson_ Committed by borisson_
Browse files

Issue #2836973 by borisson_: PHPCS fixes

parent a7a9665c
......@@ -11,8 +11,10 @@ class FacetsQuery extends SearchQuery {
/**
* Stores joined tables.
*
* @var array
*/
protected $joinedTables = array();
protected $joinedTables = [];
/**
* Adds the facet join, but only does so once.
......
......@@ -265,8 +265,8 @@ class CoreNodeSearchFacetSource extends FacetSourcePluginBase implements CoreSea
$this->facetQueryExtender->join('node_field_data', 'n', 'n.nid = i.sid AND n.langcode = i.langcode');
$this->facetQueryExtender
// ->condition('n.status', 1).
->addTag('node_access')
->searchExpression($this->keys, 'node_search');
->addTag('node_access')
->searchExpression($this->keys, 'node_search');
}
return $this->facetQueryExtender;
}
......
......@@ -26,18 +26,18 @@ class SummaryProcessor extends Plugin {
/**
* The human-readable name of the plugin.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $label;
/**
* The plugin description.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $description;
......
......@@ -104,7 +104,7 @@ class FacetsSummary extends ConfigEntityBase implements FacetsSummaryInterface {
/**
* The facet weight.
*
* @var integer
* @var int
* The weight of the facet.
*/
protected $weight;
......
......@@ -231,7 +231,6 @@ class FacetsSummaryForm extends EntityForm {
),
);
$form['facets_summary_settings'][$processor_id]['settings'] = [];
$processor_form_state = SubformState::createForSubform($form['facets_summary_settings'][$processor_id]['settings'], $form, $form_state);
$processor_form = $processor->buildConfigurationForm($form, $processor_form_state, $facets_summary);
......
......@@ -46,7 +46,7 @@ class FacetsSummaryBlock extends BlockBase implements FacetsSummaryBlockInterfac
* @param \Drupal\facets_summary\FacetsSummaryManager\DefaultFacetsSummaryManager $facets_summary_manager
* The facet manager service.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, DefaultFacetsSummaryManager $facets_summary_manager) {
public function __construct(array $configuration, $plugin_id, array $plugin_definition, DefaultFacetsSummaryManager $facets_summary_manager) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->facetsSummaryManager = $facets_summary_manager;
}
......
......@@ -24,7 +24,7 @@ class FacetsSummaryBlockDeriver implements ContainerDeriverInterface {
/**
* The entity storage used for facets summaries.
*
* @var \Drupal\Core\Entity\EntityStorageInterface $facetsSummaryStorage
* @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $facetsSummaryStorage;
......
......@@ -19,7 +19,7 @@ interface BuildProcessorInterface extends ProcessorInterface {
* @param \Drupal\facets\FacetInterface[] $facets
* The facets that are available.
*
* @return array $build
* @return array
* The render array.
*/
public function build(FacetsSummaryInterface $facet, array $build, array $facets);
......
......@@ -22,9 +22,9 @@ class IntegrationTest extends FacetsTestBase {
/**
* No config checking.
*
* @todo Enable config checking again.
*
* @var bool
*
* @todo Enable config checking again.
*/
protected $strictConfigSchema = FALSE;
......
......@@ -26,18 +26,18 @@ class FacetsFacetSource extends Plugin {
/**
* The human-readable name of the facet source plugin.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $label;
/**
* The facet source description.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $description;
......
......@@ -26,18 +26,18 @@ class FacetsHierarchy extends Plugin {
/**
* The human-readable name of the Hierarchy plugin.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $label;
/**
* The Hierarchy description.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $description;
......
......@@ -26,18 +26,18 @@ class FacetsProcessor extends Plugin {
/**
* The human-readable name of the processor plugin.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $label;
/**
* The processor description.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $description;
......
......@@ -26,9 +26,9 @@ class FacetsQueryType extends Plugin {
/**
* The human-readable name of the query type plugin.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $label;
......
......@@ -26,18 +26,18 @@ class FacetsUrlProcessor extends Plugin {
/**
* The human-readable name of the URL processor plugin.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $label;
/**
* The URL processor description.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $description;
......
......@@ -26,18 +26,18 @@ class FacetsWidget extends Plugin {
/**
* The human-readable name of the widget plugin.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $label;
/**
* The widget description.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $description;
......
......@@ -128,7 +128,7 @@ class Facet extends ConfigEntityBase implements FacetInterface {
/**
* Hard limit for the facet items.
*
* @var integer
* @var int
*/
protected $hard_limit;
......@@ -233,7 +233,7 @@ class Facet extends ConfigEntityBase implements FacetInterface {
* A boolean that defines whether or not the facet is only visible when the
* facet source is visible.
*
* @var boolean
* @var bool
*/
protected $only_visible_when_facet_source_is_visible;
......@@ -247,7 +247,7 @@ class Facet extends ConfigEntityBase implements FacetInterface {
/**
* The no-result configuration.
*
* @var string[];
* @var string[]
*/
protected $empty_behavior;
......@@ -277,7 +277,7 @@ class Facet extends ConfigEntityBase implements FacetInterface {
/**
* The facet weight.
*
* @var integer
* @var int
* The weight of the facet.
*/
protected $weight;
......@@ -285,7 +285,7 @@ class Facet extends ConfigEntityBase implements FacetInterface {
/**
* The minimum amount of results to show.
*
* @var integer
* @var int
* The minimum amount of results.
*/
protected $min_count = 1;
......@@ -377,7 +377,7 @@ class Facet extends ConfigEntityBase implements FacetInterface {
// TODO: do not hardcode on taxonomy, make this configurable (or better,
// autoselected depending field type).
return ['type' => 'taxonomy', 'config' => []];
// return $this->hierarchy;
return $this->hierarchy;
}
/**
......
......@@ -163,7 +163,7 @@ interface FacetInterface extends ConfigEntityInterface {
/**
* Returns the result for the facet.
*
* @return \Drupal\facets\Result\ResultInterface[] $results
* @return \Drupal\facets\Result\ResultInterface[]
* The results of the facet.
*/
public function getResults();
......
......@@ -67,6 +67,8 @@ class DefaultFacetManager {
/**
* An array of all entity ids in the active resultset which are a child.
*
* @var string[]
*/
protected $childIds = [];
......
......@@ -400,7 +400,7 @@ class FacetForm extends EntityForm {
'search_api_index' => $facet->getFacetSource()->getIndex()->id(),
]);
$description = $this->t('Renders the items using hierarchy. Make sure to enable the hierarchy processor on the <a href=":processor-url">Search api index processor configuration</a> for this to work as expected. If disabled all items will be flatten.', [
':processor-url' => $processor_url->toString()
':processor-url' => $processor_url->toString(),
]);
$form['facet_settings']['use_hierarchy']['#description'] = $description;
$form['facet_settings']['use_hierarchy']['#description'] .= '<br />';
......
......@@ -38,6 +38,6 @@ interface HierarchyInterface {
* @return array
* Given parent ids as key, value is an array of child ids.
*/
public function getChildIds($ids);
public function getChildIds(array $ids);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment