Commit c936d58a authored by borisson_'s avatar borisson_
Browse files

Code style fixes.

parent 87b589fe
......@@ -209,7 +209,7 @@ interface FacetInterface extends ConfigEntityInterface {
* Sets the exclude.
*
* @param bool $exclude
* A boolean flag indicating if search should exclude selected facets
* A boolean flag indicating if search should exclude selected facets.
*/
public function setExclude($exclude);
......
......@@ -8,7 +8,6 @@
namespace Drupal\facets\FacetManager;
use Drupal\Component\Render\FormattableMarkup;
use Drupal\Core\Entity\EntityTypeManager;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\facets\Exception\InvalidProcessorException;
......@@ -194,7 +193,7 @@ class DefaultFacetManager {
* set when this method is called ensuring that facets are built only once
* regardless of how many times this method is called.
*
* @param string $facetsource_id|NULL
* @param string|NULL $facetsource_id
* The facetsource if of the currently processed facet.
*/
public function processFacets($facetsource_id = NULL) {
......@@ -248,9 +247,12 @@ class DefaultFacetManager {
*
* @param \Drupal\facets\FacetInterface $facet
* The facet we should build.
*
* @return array
* Facet render arrays.
*
* @throws \Drupal\facets\Exception\InvalidProcessorException
* Throws an exception when an invalid processor is linked to the facet.
*/
public function build(FacetInterface $facet) {
// It might be that the facet received here, is not the same as the already
......@@ -341,7 +343,7 @@ class DefaultFacetManager {
* @return \Drupal\facets\FacetInterface|NULL
* The updated facet if it exists, NULL otherwise.
*/
public function returnProcessedFacet($facet) {
public function returnProcessedFacet(FacetInterface $facet) {
$this->processFacets($facet->getFacetSourceId());
return !empty($this->facets[$facet->id()]) ? $this->facets[$facet->id()] : NULL;
}
......
......@@ -8,7 +8,6 @@ namespace Drupal\Tests\facets\Unit\Plugin\processor;
use Drupal\facets\Entity\Facet;
use Drupal\facets\Plugin\facets\processor\ExcludeSpecifiedItemsProcessor;
use Drupal\facets\Processor\ProcessorInterface;
use Drupal\facets\Result\Result;
use Drupal\Tests\UnitTestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
......
......@@ -121,5 +121,4 @@ class HideNonNarrowingResultProcessorTest extends UnitTestCase {
$this->assertEquals(FALSE, $this->processor->isLocked());
}
}
......@@ -127,7 +127,7 @@ class ProcessorPluginManagerTest extends UnitTestCase {
$stages = [
ProcessorInterface::STAGE_PRE_QUERY,
ProcessorInterface::STAGE_POST_QUERY,
ProcessorInterface::STAGE_BUILD
ProcessorInterface::STAGE_BUILD,
];
$this->assertEquals($stages, array_keys($sut->getProcessingStages()));
......
Supports Markdown
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