Completed
Push — master ( 352206...c4984f )
by Vitaliy
47s
created
src/Processor/FilterProcessor.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,15 +19,15 @@
 block discarded – undo
19 19
         $value = $operation->getValue();
20 20
         $operator = $operation->getOperator();
21 21
         $field = $operation->getField();
22
-        if($operator == FilterOperation::STR_STARTS_WITH){
22
+        if ($operator == FilterOperation::STR_STARTS_WITH) {
23 23
             $operator = FilterOperation::OPERATOR_LIKE;
24
-            $value  = $value."%";
25
-        }else if($operator == FilterOperation::STR_ENDS_WITH){
24
+            $value  = $value . "%";
25
+        } else if ($operator == FilterOperation::STR_ENDS_WITH) {
26 26
             $operator = FilterOperation::OPERATOR_LIKE;
27
-            $value  = "%".$value;
28
-        }else if($operator == FilterOperation::STR_CONTAINS){
27
+            $value  = "%" . $value;
28
+        } else if ($operator == FilterOperation::STR_CONTAINS) {
29 29
             $operator = FilterOperation::OPERATOR_LIKE;
30
-            $value  = "%".$value."%";
30
+            $value  = "%" . $value . "%";
31 31
         }
32 32
         $src->where($field, $operator, $value);
33 33
         return $src;
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@
 block discarded – undo
22 22
         if($operator == FilterOperation::STR_STARTS_WITH){
23 23
             $operator = FilterOperation::OPERATOR_LIKE;
24 24
             $value  = $value."%";
25
-        }else if($operator == FilterOperation::STR_ENDS_WITH){
25
+        } else if($operator == FilterOperation::STR_ENDS_WITH){
26 26
             $operator = FilterOperation::OPERATOR_LIKE;
27 27
             $value  = "%".$value;
28
-        }else if($operator == FilterOperation::STR_CONTAINS){
28
+        } else if($operator == FilterOperation::STR_CONTAINS){
29 29
             $operator = FilterOperation::OPERATOR_LIKE;
30 30
             $value  = "%".$value."%";
31 31
         }
Please login to merge, or discard this patch.