Completed
Branch master (ffc11c)
by Gaetano
16:51
created
Persistence/eZFind/Content/Search/Common/Gateway/FacetHandler/Field.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     {
39 39
         $facetKey = $this->getFacetKey($facetBuilder);
40 40
         $fieldNames = [];
41
-        foreach ((array) $facetBuilder->fieldPaths as $fieldPath) {
41
+        foreach ((array)$facetBuilder->fieldPaths as $fieldPath) {
42 42
             $fieldNames[] = \eZSolr::getFieldName($fieldPath, false, 'facet');
43 43
         }
44 44
 
Please login to merge, or discard this patch.
eZFind/Content/Search/Common/Gateway/CriterionHandler/LocationPriority.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,29 +8,29 @@
 block discarded – undo
8 8
 
9 9
 class LocationPriority extends CriterionHandler
10 10
 {
11
-    public function accept( Criterion $criterion )
11
+    public function accept(Criterion $criterion)
12 12
     {
13 13
         return $criterion instanceof Criterion\LocationPriority;
14 14
     }
15 15
 
16
-    public function handle( CriteriaConverter $converter, Criterion $criterion )
16
+    public function handle(CriteriaConverter $converter, Criterion $criterion)
17 17
     {
18
-        switch ( $criterion->operator )
18
+        switch ($criterion->operator)
19 19
         {
20 20
             case Criterion\Operator::BETWEEN:
21 21
                 return 'priority:[' . $this->escapeValue($criterion->value[0]) . ' TO ' . $this->escapeValue($criterion->value[1]) . ']';
22 22
 
23 23
             case Criterion\Operator::GT:
24
-                return 'priority:{' . $this->escapeValue(reset( $criterion->value )) . ' TO *]';
24
+                return 'priority:{' . $this->escapeValue(reset($criterion->value)) . ' TO *]';
25 25
 
26 26
             case Criterion\Operator::GTE:
27
-                return 'priority:[' . $this->escapeValue(reset( $criterion->value )) . ' TO *]';
27
+                return 'priority:[' . $this->escapeValue(reset($criterion->value)) . ' TO *]';
28 28
 
29 29
             case Criterion\Operator::LT:
30
-                return 'priority:[* TO ' . $this->escapeValue(reset( $criterion->value )) . '}';
30
+                return 'priority:[* TO ' . $this->escapeValue(reset($criterion->value)) . '}';
31 31
 
32 32
             case Criterion\Operator::LTE:
33
-                return 'priority:[* TO ' . $this->escapeValue(reset( $criterion->value )) . ']';
33
+                return 'priority:[* TO ' . $this->escapeValue(reset($criterion->value)) . ']';
34 34
 
35 35
         }
36 36
     }
Please login to merge, or discard this patch.
eZFind/Content/Search/Common/Gateway/CriterionHandler/FieldBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     protected function determineFieldName($fieldName)
29 29
     {
30 30
         $fieldName = $this->getLegacyKernel()->runCallback(
31
-            function () use ($fieldName) {
31
+            function() use ($fieldName) {
32 32
                 return \eZSolr::getFieldName($fieldName, false, 'facet');
33 33
             },
34 34
             false
Please login to merge, or discard this patch.
Persistence/eZFind/Content/Search/Common/Gateway/CriterionHandler/Depth.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@
 block discarded – undo
8 8
 
9 9
 class Depth extends CriterionHandler
10 10
 {
11
-    public function accept( Criterion $criterion )
11
+    public function accept(Criterion $criterion)
12 12
     {
13 13
         return $criterion instanceof Criterion\Depth;
14 14
     }
15 15
 
16
-    public function handle( CriteriaConverter $converter, Criterion $criterion )
16
+    public function handle(CriteriaConverter $converter, Criterion $criterion)
17 17
     {
18 18
         $result = [];
19 19
 
Please login to merge, or discard this patch.
eZFind/Content/Search/Common/Gateway/CriterionHandler/SectionId.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@
 block discarded – undo
8 8
 
9 9
 class SectionId extends CriterionHandler
10 10
 {
11
-    public function accept( Criterion $criterion )
11
+    public function accept(Criterion $criterion)
12 12
     {
13 13
         return $criterion instanceof Criterion\SectionId;
14 14
     }
15 15
 
16
-    public function handle( CriteriaConverter $converter, Criterion $criterion )
16
+    public function handle(CriteriaConverter $converter, Criterion $criterion)
17 17
     {
18 18
         $result = [];
19 19
 
Please login to merge, or discard this patch.
Persistence/eZFind/Content/Search/Common/Gateway/CriterionHandler/Field.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,17 +8,17 @@  discard block
 block discarded – undo
8 8
 
9 9
 class Field extends FieldBase
10 10
 {
11
-    public function accept( Criterion $criterion )
11
+    public function accept(Criterion $criterion)
12 12
     {
13 13
         return $criterion instanceof Criterion\Field;
14 14
     }
15 15
 
16 16
     /// @todo should we apply specific conversions based on field type?
17
-    public function handle( CriteriaConverter $converter, Criterion $criterion )
17
+    public function handle(CriteriaConverter $converter, Criterion $criterion)
18 18
     {
19 19
         $field = $this->determineFieldName($criterion->target);
20 20
 
21
-        switch ( $criterion->operator )
21
+        switch ($criterion->operator)
22 22
         {
23 23
             case Criterion\Operator::IN:
24 24
                 $values = array_map(array($this, 'escapeValue'), $criterion->value);
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * - replace %, _ chars
53 53
      * - escape regexp chars
54 54
      */
55
-    protected function like2regexp($string, $delimiter='/')
55
+    protected function like2regexp($string, $delimiter = '/')
56 56
     {
57 57
         $string = preg_quote($string, $delimiter);
58 58
         $string = str_replace(array('%', '_'), array('.*', '.'), $string);
Please login to merge, or discard this patch.
eZFind/Content/Search/Common/Gateway/CriterionHandler/DateMetadata.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,16 +9,16 @@
 block discarded – undo
9 9
 
10 10
 class DateMetadata extends CriterionHandler
11 11
 {
12
-    public function accept( Criterion $criterion )
12
+    public function accept(Criterion $criterion)
13 13
     {
14 14
         return $criterion instanceof Criterion\DateMetadata;
15 15
     }
16 16
 
17
-    public function handle( CriteriaConverter $converter, Criterion $criterion )
17
+    public function handle(CriteriaConverter $converter, Criterion $criterion)
18 18
     {
19 19
         $field = $criterion->target == Criterion\DateMetadata::MODIFIED ? 'modified' : 'published';
20 20
 
21
-        switch ( $criterion->operator )
21
+        switch ($criterion->operator)
22 22
         {
23 23
             case Criterion\Operator::BETWEEN:
24 24
                 return $field . ':[' . $this->formatDate($criterion->value[0]) . ' TO ' . $this->formatDate($criterion->value[1]) . ']';
Please login to merge, or discard this patch.
eZFind/Content/Search/Common/Gateway/CriterionHandler/SolrRaw.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@
 block discarded – undo
9 9
 
10 10
 class SolrRaw extends CriterionHandler
11 11
 {
12
-    public function accept( Criterion $criterion )
12
+    public function accept(Criterion $criterion)
13 13
     {
14 14
         return $criterion instanceof KCriterion\SolrRaw;
15 15
     }
16 16
 
17
-    public function handle( CriteriaConverter $converter, Criterion $criterion )
17
+    public function handle(CriteriaConverter $converter, Criterion $criterion)
18 18
     {
19 19
         return $criterion->value;
20 20
     }
Please login to merge, or discard this patch.
eZFind/Content/Search/Common/Gateway/CriterionHandler/ContentId.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@
 block discarded – undo
8 8
 
9 9
 class ContentId extends CriterionHandler
10 10
 {
11
-    public function accept( Criterion $criterion )
11
+    public function accept(Criterion $criterion)
12 12
     {
13 13
         return $criterion instanceof Criterion\ContentId;
14 14
     }
15 15
 
16
-    public function handle( CriteriaConverter $converter, Criterion $criterion )
16
+    public function handle(CriteriaConverter $converter, Criterion $criterion)
17 17
     {
18 18
         $result = [];
19 19
 
Please login to merge, or discard this patch.