@@ -93,7 +93,7 @@ |
||
93 | 93 | * |
94 | 94 | * @param SearchRequest $request Search request. |
95 | 95 | * @param FilterInterface $filter Filter. |
96 | - * @param array $exclude Additional names of filters to exclude. |
|
96 | + * @param integer[] $exclude Additional names of filters to exclude. |
|
97 | 97 | * |
98 | 98 | * @return array |
99 | 99 | */ |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $value = $request->get($this->getRequestField()); |
42 | 42 | |
43 | 43 | if (isset($value) && $value !== '' && !is_array($value)) { |
44 | - $request->query->set($this->getRequestField(), [ $value ]); |
|
44 | + $request->query->set($this->getRequestField(), [$value]); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | return parent::getState($request); |
@@ -86,7 +86,7 @@ |
||
86 | 86 | foreach ($this->result as $document) { |
87 | 87 | if (!$document instanceof SerializableInterface) { |
88 | 88 | throw new \LogicException( |
89 | - 'In order to serialize search response documents MUST implement ' . |
|
89 | + 'In order to serialize search response documents MUST implement '. |
|
90 | 90 | '"ONGR\FilterManagerBundle\SerializableInterface" interface.' |
91 | 91 | ); |
92 | 92 | } |
@@ -62,11 +62,11 @@ |
||
62 | 62 | { |
63 | 63 | /** @var $data RangeAwareViewData */ |
64 | 64 | $data->setMinBounds( |
65 | - new \DateTime('@' . (int) ($result->getAggregation('date_range_agg')['min'] / 1000)) |
|
65 | + new \DateTime('@'.(int)($result->getAggregation('date_range_agg')['min'] / 1000)) |
|
66 | 66 | ); |
67 | 67 | |
68 | 68 | $data->setMaxBounds( |
69 | - new \DateTime('@' . (int) ($result->getAggregation('date_range_agg')['max'] / 1000)) |
|
69 | + new \DateTime('@'.(int)($result->getAggregation('date_range_agg')['max'] / 1000)) |
|
70 | 70 | ); |
71 | 71 | |
72 | 72 | return $data; |
@@ -134,7 +134,7 @@ |
||
134 | 134 | new TermsAggregation('name', $this->getNameField()) |
135 | 135 | ); |
136 | 136 | $aggregation->addAggregation($termsAggregation); |
137 | - $filterAggregation = new FilterAggregation($name . '-filter'); |
|
137 | + $filterAggregation = new FilterAggregation($name.'-filter'); |
|
138 | 138 | $filterAggregation->setFilter($relatedSearch->getPostFilters()); |
139 | 139 | |
140 | 140 | if ($state->isActive()) { |
@@ -59,7 +59,6 @@ |
||
59 | 59 | * Returns JSON response with search response data. |
60 | 60 | * |
61 | 61 | * @param Request $request Request. |
62 | - * @param string $name Filter manager name. |
|
63 | 62 | * |
64 | 63 | * @return JsonResponse |
65 | 64 | */ |
@@ -19,7 +19,6 @@ |
||
19 | 19 | use ONGR\FilterManagerBundle\Filter\ViewData\ChoicesAwareViewData; |
20 | 20 | use ONGR\FilterManagerBundle\Filter\ViewData; |
21 | 21 | use ONGR\FilterManagerBundle\Filter\Widget\AbstractFilter; |
22 | -use ONGR\FilterManagerBundle\Filter\Widget\AbstractSingleRequestValueFilter; |
|
23 | 22 | use ONGR\FilterManagerBundle\Search\SearchRequest; |
24 | 23 | |
25 | 24 | /** |
@@ -59,14 +59,14 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | if ($relatedSearch->getPostFilters()) { |
62 | - $filterAggregation = new FilterAggregation($name . '-filter'); |
|
62 | + $filterAggregation = new FilterAggregation($name.'-filter'); |
|
63 | 63 | $filterAggregation->setFilter($relatedSearch->getPostFilters()); |
64 | 64 | $filterAggregation->addAggregation($aggregation); |
65 | 65 | $search->addAggregation($filterAggregation); |
66 | 66 | |
67 | 67 | if ($this->getOption('show_zero_choices')) { |
68 | 68 | $unfilteredAggregation = clone $aggregation; |
69 | - $unfilteredAggregation->setName($name . '-unfiltered'); |
|
69 | + $unfilteredAggregation->setName($name.'-unfiltered'); |
|
70 | 70 | $search->addAggregation($unfilteredAggregation); |
71 | 71 | } |
72 | 72 | } else { |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $unsortedChoices = []; |
93 | 93 | $zeroValueChoices = []; |
94 | 94 | |
95 | - if ($this->getOption('show_zero_choices') && $agg = $result->getAggregation($data->getName() . '-unfiltered')) { |
|
95 | + if ($this->getOption('show_zero_choices') && $agg = $result->getAggregation($data->getName().'-unfiltered')) { |
|
96 | 96 | foreach ($agg as $bucket) { |
97 | 97 | $zeroValueChoices[$bucket['key']] = $bucket['doc_count']; |
98 | 98 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $configuration = new Configuration(); |
37 | 37 | $config = $this->processConfiguration($configuration, $configs); |
38 | 38 | |
39 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
39 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
40 | 40 | $loader->load('services.yml'); |
41 | 41 | |
42 | 42 | $container->setParameter('ongr_filter_manager.filters', $config['filters']); |