Completed
Pull Request — master (#1)
by Joao
04:01 queued 01:28
created
src/Repository/IteratorFilter.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         if ($xpathFilter == "") {
38 38
             return "/anydataset/row";
39 39
         } else {
40
-            return "/anydataset/row[" . $xpathFilter . "]";
40
+            return "/anydataset/row[".$xpathFilter."]";
41 41
         }
42 42
     }
43 43
 
@@ -137,33 +137,33 @@  discard block
 block discarded – undo
137 137
     private function getStrXpathRelation($name, $relation, $value)
138 138
     {
139 139
         $str = is_numeric($value) ? "" : "'";
140
-        $field = "field[@name='" . $name . "'] ";
140
+        $field = "field[@name='".$name."'] ";
141 141
         $value = " $str$value$str ";
142 142
 
143 143
         $result = "";
144 144
         switch ($relation) {
145 145
             case Relation::EQUAL:
146
-                $result = $field . "=" . $value;
146
+                $result = $field."=".$value;
147 147
                 break;
148 148
 
149 149
             case Relation::GREATER_THAN:
150
-                $result = $field . ">" . $value;
150
+                $result = $field.">".$value;
151 151
                 break;
152 152
 
153 153
             case Relation::LESS_THAN:
154
-                $result = $field . "<" . $value;
154
+                $result = $field."<".$value;
155 155
                 break;
156 156
 
157 157
             case Relation::GREATER_OR_EQUAL_THAN:
158
-                $result = $field . ">=" . $value;
158
+                $result = $field.">=".$value;
159 159
                 break;
160 160
 
161 161
             case Relation::LESS_OR_EQUAL_THAN:
162
-                $result = $field . "<=" . $value;
162
+                $result = $field."<=".$value;
163 163
                 break;
164 164
 
165 165
             case Relation::NOT_EQUAL:
166
-                $result = $field . "!=" . $value;
166
+                $result = $field."!=".$value;
167 167
                 break;
168 168
 
169 169
             case Relation::STARTS_WITH:
@@ -192,47 +192,47 @@  discard block
 block discarded – undo
192 192
         $paramName = $name;
193 193
         $i = 0;
194 194
         while (array_key_exists($paramName, $param)) {
195
-            $paramName = $name . ($i++);
195
+            $paramName = $name.($i++);
196 196
         }
197 197
 
198 198
         $param[$paramName] = $value;
199 199
 
200 200
         $result = "";
201 201
         $field = " $name ";
202
-        $valueparam = " [[" . $paramName . "]] ";
202
+        $valueparam = " [[".$paramName."]] ";
203 203
         switch ($relation) {
204 204
             case Relation::EQUAL: {
205
-                    $result = $field . "=" . $valueparam;
205
+                    $result = $field."=".$valueparam;
206 206
                     break;
207 207
                 }
208 208
             case Relation::GREATER_THAN: {
209
-                    $result = $field . ">" . $valueparam;
209
+                    $result = $field.">".$valueparam;
210 210
                     break;
211 211
                 }
212 212
             case Relation::LESS_THAN: {
213
-                    $result = $field . "<" . $valueparam;
213
+                    $result = $field."<".$valueparam;
214 214
                     break;
215 215
                 }
216 216
             case Relation::GREATER_OR_EQUAL_THAN: {
217
-                    $result = $field . ">=" . $valueparam;
217
+                    $result = $field.">=".$valueparam;
218 218
                     break;
219 219
                 }
220 220
             case Relation::LESS_OR_EQUAL_THAN: {
221
-                    $result = $field . "<=" . $valueparam;
221
+                    $result = $field."<=".$valueparam;
222 222
                     break;
223 223
                 }
224 224
             case Relation::NOT_EQUAL: {
225
-                    $result = $field . "!=" . $valueparam;
225
+                    $result = $field."!=".$valueparam;
226 226
                     break;
227 227
                 }
228 228
             case Relation::STARTS_WITH: {
229
-                    $param[$paramName] = $value . "%";
230
-                    $result = $field . " like " . $valueparam;
229
+                    $param[$paramName] = $value."%";
230
+                    $result = $field." like ".$valueparam;
231 231
                     break;
232 232
                 }
233 233
             case Relation::CONTAINS: {
234
-                    $param[$paramName] = "%" . $value . "%";
235
-                    $result = $field . " like " . $valueparam;
234
+                    $param[$paramName] = "%".$value."%";
235
+                    $result = $field." like ".$valueparam;
236 236
                     break;
237 237
                 }
238 238
         }
Please login to merge, or discard this patch.
src/Repository/DBDataset.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -147,12 +147,12 @@
 block discarded – undo
147 147
 
148 148
         // Define the query key
149 149
         if (is_array($arKey2) && count($arKey2) > 0) {
150
-            $key2 = ":" . md5(json_encode($arKey2));
150
+            $key2 = ":".md5(json_encode($arKey2));
151 151
         } else {
152 152
             $key2 = "";
153 153
         }
154 154
 
155
-        return  "qry:" . $key1 . $key2;
155
+        return  "qry:".$key1.$key2;
156 156
     }
157 157
 
158 158
     public function getScalar($sql, $array = null)
Please login to merge, or discard this patch.
src/Repository/FixedTextFileDataset.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         if (!preg_match("~^https?://~", $source)) {
39 39
             if (!file_exists($this->source)) {
40
-                throw new NotFoundException("The specified file " . $this->source . " does not exists");
40
+                throw new NotFoundException("The specified file ".$this->source." does not exists");
41 41
             }
42 42
 
43 43
             $this->sourceType = "FILE";
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
         if (!$handle) {
75 75
             throw new DatasetException("TextFileDataset Socket error: $errstr ($errno)");
76 76
         } else {
77
-            $out = "GET " . $urlParts[4] . " HTTP/1.1\r\n";
78
-            $out .= "Host: " . $urlParts[2] . "\r\n";
77
+            $out = "GET ".$urlParts[4]." HTTP/1.1\r\n";
78
+            $out .= "Host: ".$urlParts[2]."\r\n";
79 79
             $out .= "Connection: Close\r\n\r\n";
80 80
 
81 81
             fwrite($handle, $out);
Please login to merge, or discard this patch.
src/Repository/AnyDataset.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                     if (!is_null($attr)) {
106 106
                         $sr->addField($attr->nodeValue, $field->nodeValue);
107 107
                     } else {
108
-                        throw new \InvalidArgumentException('Malformed anydataset file ' . basename($filepath));
108
+                        throw new \InvalidArgumentException('Malformed anydataset file '.basename($filepath));
109 109
                     }
110 110
                 }
111 111
                 $sr->acceptChanges();
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
         $left = $right = array();
321 321
 
322 322
         $cntSeq = count($seq);
323
-        for ($i = 1; $i < $cntSeq; $i ++) {
323
+        for ($i = 1; $i < $cntSeq; $i++) {
324 324
             if ($seq[$i]->getField($field) <= $key->getField($field)) {
325 325
                 $left[] = $seq[$i];
326 326
             } else {
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 
331 331
         return array_merge(
332 332
             $this->quickSortExec($left, $field),
333
-            [ $key ],
333
+            [$key],
334 334
             $this->quickSortExec($right, $field)
335 335
         );
336 336
     }
Please login to merge, or discard this patch.
src/Repository/FixedTextFileIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
             $fields[$fieldDef->fieldName] = substr($buffer, $fieldDef->startPos, $fieldDef->length);
104 104
             if (!empty($fieldDef->requiredValue)
105 105
                 && (
106
-                    !preg_match("/^[" . $fieldDef->requiredValue . "]$/", $fields[$fieldDef->fieldName])
106
+                    !preg_match("/^[".$fieldDef->requiredValue."]$/", $fields[$fieldDef->fieldName])
107 107
                 )
108 108
             ) {
109 109
                 throw new IteratorException(
Please login to merge, or discard this patch.
src/ConnectionManagement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $parts = array();
169 169
         if (!preg_match($pat, $this->getDbConnectionString(), $parts)) {
170 170
             throw new InvalidArgumentException(
171
-                "Connection string " . $this->getDbConnectionString() . " is invalid! Please fix it."
171
+                "Connection string ".$this->getDbConnectionString()." is invalid! Please fix it."
172 172
             );
173 173
         }
174 174
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
         if (!isset($parts['path']) && !isset($parts['host'])) {
179 179
             throw new InvalidArgumentException(
180
-                "Connection string " . $this->getDbConnectionString() . " is invalid! Please fix it."
180
+                "Connection string ".$this->getDbConnectionString()." is invalid! Please fix it."
181 181
             );
182 182
         }
183 183
         
Please login to merge, or discard this patch.