@@ -57,7 +57,7 @@ |
||
57 | 57 | * @param Request $request |
58 | 58 | * @param string $managerName |
59 | 59 | * |
60 | - * @return array |
|
60 | + * @return JsonResponse |
|
61 | 61 | */ |
62 | 62 | public function jsonAction(Request $request, $managerName) |
63 | 63 | { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | ->arrayNode('filters') |
76 | 76 | ->validate() |
77 | 77 | ->ifTrue( |
78 | - function ($v) { |
|
78 | + function($v) { |
|
79 | 79 | $v = array_filter($v); |
80 | 80 | |
81 | 81 | return empty($v); |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | ->prototype('array') |
184 | 184 | ->beforeNormalization() |
185 | 185 | ->always( |
186 | - function ($v) { |
|
186 | + function($v) { |
|
187 | 187 | if (empty($v['fields']) && !empty($v['field'])) { |
188 | 188 | $field = ['field' => $v['field']]; |
189 | 189 | if (array_key_exists('order', $v)) { |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | $filter |
272 | 272 | ->validate() |
273 | 273 | ->ifTrue( |
274 | - function ($v) { |
|
274 | + function($v) { |
|
275 | 275 | return empty($v['include']) && empty($v['exclude']); |
276 | 276 | } |
277 | 277 | ) |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | ->end() |
280 | 280 | ->validate() |
281 | 281 | ->ifTrue( |
282 | - function ($v) { |
|
282 | + function($v) { |
|
283 | 283 | return !empty($v['include']) && !empty($v['exclude']); |
284 | 284 | } |
285 | 285 | ) |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | ->beforeNormalization() |
291 | 291 | ->ifString() |
292 | 292 | ->then( |
293 | - function ($v) { |
|
293 | + function($v) { |
|
294 | 294 | return [$v]; |
295 | 295 | } |
296 | 296 | )->end() |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | ->beforeNormalization() |
301 | 301 | ->ifString() |
302 | 302 | ->then( |
303 | - function ($v) { |
|
303 | + function($v) { |
|
304 | 304 | return [$v]; |
305 | 305 | } |
306 | 306 | ) |
@@ -27,11 +27,11 @@ |
||
27 | 27 | |
28 | 28 | $definition->addMethodCall('setField', [$configuration['field']]); |
29 | 29 | |
30 | - !isset($configuration['fuzziness']) ? : $definition |
|
30 | + !isset($configuration['fuzziness']) ?: $definition |
|
31 | 31 | ->addMethodCall('setFuzziness', [$configuration['fuzziness']]); |
32 | - !isset($configuration['prefix_length']) ? : $definition |
|
32 | + !isset($configuration['prefix_length']) ?: $definition |
|
33 | 33 | ->addMethodCall('setPrefixLength', [$configuration['prefix_length']]); |
34 | - !isset($configuration['max_expansions']) ? : $definition |
|
34 | + !isset($configuration['max_expansions']) ?: $definition |
|
35 | 35 | ->addMethodCall('setMaxExpansions', [$configuration['max_expansions']]); |
36 | 36 | } |
37 | 37 |
@@ -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); |
@@ -25,11 +25,11 @@ |
||
25 | 25 | { |
26 | 26 | parent::configure($definition, $configuration); |
27 | 27 | |
28 | - !isset($configuration['field']) ? : $definition->addMethodCall('setField', [$configuration['field']]); |
|
28 | + !isset($configuration['field']) ?: $definition->addMethodCall('setField', [$configuration['field']]); |
|
29 | 29 | |
30 | - !isset($configuration['operator']) ? : $definition |
|
30 | + !isset($configuration['operator']) ?: $definition |
|
31 | 31 | ->addMethodCall('setOperator', [$configuration['operator']]); |
32 | - !isset($configuration['fuzziness']) ? : $definition |
|
32 | + !isset($configuration['fuzziness']) ?: $definition |
|
33 | 33 | ->addMethodCall('setFuzziness', [$configuration['fuzziness']]); |
34 | 34 | } |
35 | 35 |
@@ -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 | } |
@@ -38,11 +38,11 @@ discard block |
||
38 | 38 | $configuration = new Configuration(); |
39 | 39 | $config = $this->processConfiguration($configuration, $configs); |
40 | 40 | |
41 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
41 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
42 | 42 | $loader->load('services.yml'); |
43 | 43 | |
44 | - !isset($config['filters']) ? : $this->addFilters($config['filters'], $container); |
|
45 | - !isset($config['managers']) ? : $this->addFilterManagers($config, $container); |
|
44 | + !isset($config['filters']) ?: $this->addFilters($config['filters'], $container); |
|
45 | + !isset($config['managers']) ?: $this->addFilterManagers($config, $container); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | { |
180 | 180 | if (!empty($filter['relations'][$urlType][$relationType])) { |
181 | 181 | $definition->addMethodCall( |
182 | - 'set' . ucfirst($urlType) . 'Relation', |
|
182 | + 'set'.ucfirst($urlType).'Relation', |
|
183 | 183 | [$this->getRelation($relationType, $filter['relations'][$urlType][$relationType])] |
184 | 184 | ); |
185 | 185 | } |
@@ -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; |