Completed
Pull Request — master (#242)
by Kamil
64:54
created
Search/FilterManager.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
Filter/Widget/Choice/MultiTermChoice.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Controller/ManagerController.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,6 @@
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
Filter/Widget/Choice/SingleTermChoice.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
DependencyInjection/ONGRFilterManagerExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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']);
Please login to merge, or discard this patch.
Filter/ViewData/AggregateViewData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
     public function sortItems($callback = null)
54 54
     {
55 55
         if ($callback === null) {
56
-            $callback = function ($a, $b) {
56
+            $callback = function($a, $b) {
57 57
                 return strcmp($a->getName(), $b->getName());
58 58
             };
59 59
         }
Please login to merge, or discard this patch.
Filter/Widget/Dynamic/DynamicAggregate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
         $aggregation = new NestedAggregation($state->getName(), $path);
157 157
         $nameAggregation = new TermsAggregation('name', $this->getNameField());
158 158
         $valueAggregation = new TermsAggregation('value', $field);
159
-        $filterAggregation = new FilterAggregation($state->getName() . '-filter');
159
+        $filterAggregation = new FilterAggregation($state->getName().'-filter');
160 160
         $nameAggregation->addAggregation($valueAggregation);
161 161
         $aggregation->addAggregation($nameAggregation);
162 162
         $filterAggregation->setFilter($filter);
Please login to merge, or discard this patch.
DependencyInjection/Configuration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $filter
113 113
             ->validate()
114 114
                 ->ifTrue(
115
-                    function ($v) {
115
+                    function($v) {
116 116
                         return empty($v['include']) && empty($v['exclude']);
117 117
                     }
118 118
                 )
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             ->end()
121 121
             ->validate()
122 122
                 ->ifTrue(
123
-                    function ($v) {
123
+                    function($v) {
124 124
                         return !empty($v['include']) && !empty($v['exclude']);
125 125
                     }
126 126
                 )
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                     ->beforeNormalization()
132 132
                         ->ifString()
133 133
                         ->then(
134
-                            function ($v) {
134
+                            function($v) {
135 135
                                 return [$v];
136 136
                             }
137 137
                         )->end()
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                     ->beforeNormalization()
142 142
                         ->ifString()
143 143
                         ->then(
144
-                            function ($v) {
144
+                            function($v) {
145 145
                                 return [$v];
146 146
                             }
147 147
                         )
Please login to merge, or discard this patch.
Filter/Widget/Search/MatchSearch.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@
 block discarded – undo
58 58
             list ($field, $boost) = explode('^', $field);
59 59
         }
60 60
 
61
-        $query =  new MatchQuery($field, $state->getValue(), $this->getOptions());
62
-        !isset($boost) ? : $query->addParameter('boost', $boost);
61
+        $query = new MatchQuery($field, $state->getValue(), $this->getOptions());
62
+        !isset($boost) ?: $query->addParameter('boost', $boost);
63 63
 
64 64
         if (isset($path)) {
65 65
             $query = new NestedQuery($path, $query);
Please login to merge, or discard this patch.