Test Failed
Push — master ( ead203...921ad1 )
by
unknown
01:39
created
src/FrontQL/Adapter/Select/SelectPayload.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -38,21 +38,21 @@  discard block
 block discarded – undo
38 38
     public function getColumns()
39 39
     {
40 40
         // Se nenhuma coluna foi definida todas serão retornadas
41
-        if(!isset($this->payload['columns']) || !is_array($this->payload['columns']))
41
+        if (!isset($this->payload['columns']) || !is_array($this->payload['columns']))
42 42
             return ['*'];
43 43
 
44 44
         $regex = '/^[a-zA-Z_][a-zA-Z0-9_]*$/';
45 45
         $columns = array();
46 46
 
47
-        foreach ($this->payload['columns'] as $column){
47
+        foreach ($this->payload['columns'] as $column) {
48 48
             // Valida o nome da coluna
49
-            if(!is_string($column) || !preg_match($regex, $column))
49
+            if (!is_string($column) || !preg_match($regex, $column))
50 50
                 throw new InvalidColumnNameException();
51 51
 
52 52
             $columns[] = $column;
53 53
         }
54 54
 
55
-        if(count($columns) == 0)
55
+        if (count($columns) == 0)
56 56
             return ['*'];
57 57
 
58 58
         return $columns;
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function getLimit()
67 67
     {
68
-        if(!isset($this->payload['limit']))
68
+        if (!isset($this->payload['limit']))
69 69
             return 500;
70 70
 
71
-        if(!is_numeric($this->payload['limit']))
71
+        if (!is_numeric($this->payload['limit']))
72 72
             return 500;
73 73
 
74 74
         return (int) $this->payload['limit'];
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function getOffset()
83 83
     {
84
-        if(!isset($this->payload['offset']))
84
+        if (!isset($this->payload['offset']))
85 85
             return null;
86 86
 
87
-        if(!is_numeric($this->payload['offset']))
87
+        if (!is_numeric($this->payload['offset']))
88 88
             return null;
89 89
 
90 90
         return (int) $this->payload['offset'];
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         $allowed = ['ASC', 'DESC'];
101 101
 
102
-        if(!isset($this->payload['order']) || !is_array($this->payload['order']))
102
+        if (!isset($this->payload['order']) || !is_array($this->payload['order']))
103 103
             return null;
104 104
 
105 105
         $orders = array();
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function getWhere()
123 123
     {
124
-        if(!is_array($this->payload['where']))
124
+        if (!is_array($this->payload['where']))
125 125
             return [];
126 126
 
127 127
         $adapter = new WhereAdapter();
Please login to merge, or discard this patch.