Completed
Push — master ( a52629...cbc88e )
by Joao
04:07
created
src/Repository/FixedTextFileIterator.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -84,6 +84,10 @@
 block discarded – undo
84 84
         }
85 85
     }
86 86
 
87
+    /**
88
+     * @param string $buffer
89
+     * @param FixedTextDefinition[] $fieldDefinition
90
+     */
87 91
     protected function processBuffer($buffer, $fieldDefinition)
88 92
     {
89 93
         $cntDef = count($fieldDefinition);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,9 +92,9 @@
 block discarded – undo
92 92
             $fieldDef = $fieldDefinition[$i];
93 93
 
94 94
             $fields[$fieldDef->fieldName] = substr($buffer, $fieldDef->startPos, $fieldDef->length);
95
-            if (!empty($fieldDef->requiredValue) && (!preg_match("/^[" . $fieldDef->requiredValue . "]$/",
95
+            if (!empty($fieldDef->requiredValue) && (!preg_match("/^[".$fieldDef->requiredValue."]$/",
96 96
                     $fields[$fieldDef->fieldName]))) {
97
-                throw new IteratorException("Expected the value '" . $fieldDef->requiredValue . "' and I got '" . $fields[$fieldDef->fieldName] . "'");
97
+                throw new IteratorException("Expected the value '".$fieldDef->requiredValue."' and I got '".$fields[$fieldDef->fieldName]."'");
98 98
             } elseif (is_array($fieldDef->subTypes)) {
99 99
                 $fields[$fieldDef->fieldName] = $this->processBuffer($fields[$fieldDef->fieldName], $fieldDef->subTypes);
100 100
             }
Please login to merge, or discard this patch.
src/Repository/IteratorFilter.php 4 patches
Doc Comments   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,6 @@  discard block
 block discarded – undo
47 47
      * @param string $tableName
48 48
      * @param array &$params
49 49
      * @param string $returnFields
50
-     * @param string $paramSubstName If ended with "_" the program subst by argname;
51 50
      * @return string
52 51
      */
53 52
     public function getSql($tableName, &$params, $returnFields = "*")
@@ -72,8 +71,8 @@  discard block
 block discarded – undo
72 71
 
73 72
     /**
74 73
      *
75
-     * @param $array
76
-     * @return unknown_type
74
+     * @param SingleRow[] $array
75
+     * @return \DOMNodeList
77 76
      */
78 77
     public function match($array)
79 78
     {
@@ -93,7 +92,7 @@  discard block
 block discarded – undo
93 92
      *
94 93
      * @param $type use XPATH or SQL
95 94
      * @param $param
96
-     * @return unknown_type
95
+     * @return string
97 96
      */
98 97
     public function getFilter($type, &$param)
99 98
     {
@@ -242,7 +241,7 @@  discard block
 block discarded – undo
242 241
     /**
243 242
      *
244 243
      * @param string[] $array
245
-     * @return string
244
+     * @return boolean
246 245
      */
247 246
     private function evalString($array)
248 247
     {
Please login to merge, or discard this patch.
Switch Indentation   +98 added lines, -98 removed lines patch added patch discarded remove patch
@@ -141,38 +141,38 @@  discard block
 block discarded – undo
141 141
 
142 142
         $result = "";
143 143
         switch ($relation) {
144
-            case Relation::EQUAL: {
145
-                    $result = $field . "=" . $value;
146
-                    break;
147
-                }
148
-            case Relation::GREATER_THAN: {
149
-                    $result = $field . ">" . $value;
150
-                    break;
151
-                }
152
-            case Relation::LESS_THAN: {
153
-                    $result = $field . "<" . $value;
154
-                    break;
155
-                }
156
-            case Relation::GREATER_OR_EQUAL_THAN: {
157
-                    $result = $field . ">=" . $value;
158
-                    break;
159
-                }
160
-            case Relation::LESS_OR_EQUAL_THAN: {
161
-                    $result = $field . "<=" . $value;
162
-                    break;
163
-                }
164
-            case Relation::NOT_EQUAL: {
165
-                    $result = $field . "!=" . $value;
166
-                    break;
167
-                }
168
-            case Relation::STARTS_WITH: {
169
-                    $result = " starts-with($field, $value) ";
170
-                    break;
171
-                }
172
-            case Relation::CONTAINS: {
173
-                    $result = " contains($field, $value) ";
174
-                    break;
175
-                }
144
+        case Relation::EQUAL: {
145
+                $result = $field . "=" . $value;
146
+                break;
147
+            }
148
+        case Relation::GREATER_THAN: {
149
+                $result = $field . ">" . $value;
150
+                break;
151
+            }
152
+        case Relation::LESS_THAN: {
153
+                $result = $field . "<" . $value;
154
+                break;
155
+            }
156
+        case Relation::GREATER_OR_EQUAL_THAN: {
157
+                $result = $field . ">=" . $value;
158
+                break;
159
+            }
160
+        case Relation::LESS_OR_EQUAL_THAN: {
161
+                $result = $field . "<=" . $value;
162
+                break;
163
+            }
164
+        case Relation::NOT_EQUAL: {
165
+                $result = $field . "!=" . $value;
166
+                break;
167
+            }
168
+        case Relation::STARTS_WITH: {
169
+                $result = " starts-with($field, $value) ";
170
+                break;
171
+            }
172
+        case Relation::CONTAINS: {
173
+                $result = " contains($field, $value) ";
174
+                break;
175
+            }
176 176
         }
177 177
         return $result;
178 178
     }
@@ -200,40 +200,40 @@  discard block
 block discarded – undo
200 200
         $field = " $name ";
201 201
         $valueparam = " [[" . $paramName . "]] ";
202 202
         switch ($relation) {
203
-            case Relation::EQUAL: {
204
-                    $result = $field . "=" . $valueparam;
205
-                    break;
206
-                }
207
-            case Relation::GREATER_THAN: {
208
-                    $result = $field . ">" . $valueparam;
209
-                    break;
210
-                }
211
-            case Relation::LESS_THAN: {
212
-                    $result = $field . "<" . $valueparam;
213
-                    break;
214
-                }
215
-            case Relation::GREATER_OR_EQUAL_THAN: {
216
-                    $result = $field . ">=" . $valueparam;
217
-                    break;
218
-                }
219
-            case Relation::LESS_OR_EQUAL_THAN: {
220
-                    $result = $field . "<=" . $valueparam;
221
-                    break;
222
-                }
223
-            case Relation::NOT_EQUAL: {
224
-                    $result = $field . "!=" . $valueparam;
225
-                    break;
226
-                }
227
-            case Relation::STARTS_WITH: {
228
-                    $param[$paramName] = $value . "%";
229
-                    $result = $field . " like " . $valueparam;
230
-                    break;
231
-                }
232
-            case Relation::CONTAINS: {
233
-                    $param[$paramName] = "%" . $value . "%";
234
-                    $result = $field . " like " . $valueparam;
235
-                    break;
236
-                }
203
+        case Relation::EQUAL: {
204
+                $result = $field . "=" . $valueparam;
205
+                break;
206
+            }
207
+        case Relation::GREATER_THAN: {
208
+                $result = $field . ">" . $valueparam;
209
+                break;
210
+            }
211
+        case Relation::LESS_THAN: {
212
+                $result = $field . "<" . $valueparam;
213
+                break;
214
+            }
215
+        case Relation::GREATER_OR_EQUAL_THAN: {
216
+                $result = $field . ">=" . $valueparam;
217
+                break;
218
+            }
219
+        case Relation::LESS_OR_EQUAL_THAN: {
220
+                $result = $field . "<=" . $valueparam;
221
+                break;
222
+            }
223
+        case Relation::NOT_EQUAL: {
224
+                $result = $field . "!=" . $valueparam;
225
+                break;
226
+            }
227
+        case Relation::STARTS_WITH: {
228
+                $param[$paramName] = $value . "%";
229
+                $result = $field . " like " . $valueparam;
230
+                break;
231
+            }
232
+        case Relation::CONTAINS: {
233
+                $param[$paramName] = "%" . $value . "%";
234
+                $result = $field . " like " . $valueparam;
235
+                break;
236
+            }
237 237
         }
238 238
 
239 239
         return $result;
@@ -268,38 +268,38 @@  discard block
 block discarded – undo
268 268
 
269 269
             foreach ($field as $valueparam) {
270 270
                 switch ($relation) {
271
-                    case Relation::EQUAL: {
272
-                            $result[$pos] &= ($valueparam == $value);
273
-                            break;
274
-                        }
275
-                    case Relation::GREATER_THAN: {
276
-                            $result[$pos] &= ($valueparam > $value);
277
-                            break;
278
-                        }
279
-                    case Relation::LESS_THAN: {
280
-                            $result[$pos] &= ($valueparam < $value);
281
-                            break;
282
-                        }
283
-                    case Relation::GREATER_OR_EQUAL_THAN: {
284
-                            $result[$pos] &= ($valueparam >= $value);
285
-                            break;
286
-                        }
287
-                    case Relation::LESS_OR_EQUAL_THAN: {
288
-                            $result[$pos] &= ($valueparam <= $value);
289
-                            break;
290
-                        }
291
-                    case Relation::NOT_EQUAL: {
292
-                            $result[$pos] &= ($valueparam != $value);
293
-                            break;
294
-                        }
295
-                    case Relation::STARTS_WITH: {
296
-                            $result[$pos] &= (strpos($valueparam, $value) === 0);
297
-                            break;
298
-                        }
299
-                    case Relation::CONTAINS: {
300
-                            $result[$pos] &= (strpos($valueparam, $value) !== false);
301
-                            break;
302
-                        }
271
+                case Relation::EQUAL: {
272
+                        $result[$pos] &= ($valueparam == $value);
273
+                        break;
274
+                    }
275
+                case Relation::GREATER_THAN: {
276
+                        $result[$pos] &= ($valueparam > $value);
277
+                        break;
278
+                    }
279
+                case Relation::LESS_THAN: {
280
+                        $result[$pos] &= ($valueparam < $value);
281
+                        break;
282
+                    }
283
+                case Relation::GREATER_OR_EQUAL_THAN: {
284
+                        $result[$pos] &= ($valueparam >= $value);
285
+                        break;
286
+                    }
287
+                case Relation::LESS_OR_EQUAL_THAN: {
288
+                        $result[$pos] &= ($valueparam <= $value);
289
+                        break;
290
+                    }
291
+                case Relation::NOT_EQUAL: {
292
+                        $result[$pos] &= ($valueparam != $value);
293
+                        break;
294
+                    }
295
+                case Relation::STARTS_WITH: {
296
+                        $result[$pos] &= (strpos($valueparam, $value) === 0);
297
+                        break;
298
+                    }
299
+                case Relation::CONTAINS: {
300
+                        $result[$pos] &= (strpos($valueparam, $value) !== false);
301
+                        break;
302
+                    }
303 303
                 }
304 304
             }
305 305
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -264,7 +264,9 @@
 block discarded – undo
264 264
 
265 265
             $field = $array->getField($name);
266 266
 
267
-            if (!is_array($field)) $field = array($field);
267
+            if (!is_array($field)) {
268
+                $field = array($field);
269
+            }
268 270
 
269 271
             foreach ($field as $valueparam) {
270 272
                 switch ($relation) {
Please login to merge, or discard this 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
 
@@ -136,33 +136,33 @@  discard block
 block discarded – undo
136 136
     private function getStrXpathRelation($name, $relation, $value)
137 137
     {
138 138
         $str = is_numeric($value) ? "" : "'";
139
-        $field = "field[@name='" . $name . "'] ";
139
+        $field = "field[@name='".$name."'] ";
140 140
         $value = " $str$value$str ";
141 141
 
142 142
         $result = "";
143 143
         switch ($relation) {
144 144
             case Relation::EQUAL: {
145
-                    $result = $field . "=" . $value;
145
+                    $result = $field."=".$value;
146 146
                     break;
147 147
                 }
148 148
             case Relation::GREATER_THAN: {
149
-                    $result = $field . ">" . $value;
149
+                    $result = $field.">".$value;
150 150
                     break;
151 151
                 }
152 152
             case Relation::LESS_THAN: {
153
-                    $result = $field . "<" . $value;
153
+                    $result = $field."<".$value;
154 154
                     break;
155 155
                 }
156 156
             case Relation::GREATER_OR_EQUAL_THAN: {
157
-                    $result = $field . ">=" . $value;
157
+                    $result = $field.">=".$value;
158 158
                     break;
159 159
                 }
160 160
             case Relation::LESS_OR_EQUAL_THAN: {
161
-                    $result = $field . "<=" . $value;
161
+                    $result = $field."<=".$value;
162 162
                     break;
163 163
                 }
164 164
             case Relation::NOT_EQUAL: {
165
-                    $result = $field . "!=" . $value;
165
+                    $result = $field."!=".$value;
166 166
                     break;
167 167
                 }
168 168
             case Relation::STARTS_WITH: {
@@ -191,47 +191,47 @@  discard block
 block discarded – undo
191 191
         $paramName = $name;
192 192
         $i = 0;
193 193
         while (array_key_exists($paramName, $param)) {
194
-            $paramName = $name . ($i++);
194
+            $paramName = $name.($i++);
195 195
         }
196 196
 
197 197
         $param[$paramName] = $value;
198 198
 
199 199
         $result = "";
200 200
         $field = " $name ";
201
-        $valueparam = " [[" . $paramName . "]] ";
201
+        $valueparam = " [[".$paramName."]] ";
202 202
         switch ($relation) {
203 203
             case Relation::EQUAL: {
204
-                    $result = $field . "=" . $valueparam;
204
+                    $result = $field."=".$valueparam;
205 205
                     break;
206 206
                 }
207 207
             case Relation::GREATER_THAN: {
208
-                    $result = $field . ">" . $valueparam;
208
+                    $result = $field.">".$valueparam;
209 209
                     break;
210 210
                 }
211 211
             case Relation::LESS_THAN: {
212
-                    $result = $field . "<" . $valueparam;
212
+                    $result = $field."<".$valueparam;
213 213
                     break;
214 214
                 }
215 215
             case Relation::GREATER_OR_EQUAL_THAN: {
216
-                    $result = $field . ">=" . $valueparam;
216
+                    $result = $field.">=".$valueparam;
217 217
                     break;
218 218
                 }
219 219
             case Relation::LESS_OR_EQUAL_THAN: {
220
-                    $result = $field . "<=" . $valueparam;
220
+                    $result = $field."<=".$valueparam;
221 221
                     break;
222 222
                 }
223 223
             case Relation::NOT_EQUAL: {
224
-                    $result = $field . "!=" . $valueparam;
224
+                    $result = $field."!=".$valueparam;
225 225
                     break;
226 226
                 }
227 227
             case Relation::STARTS_WITH: {
228
-                    $param[$paramName] = $value . "%";
229
-                    $result = $field . " like " . $valueparam;
228
+                    $param[$paramName] = $value."%";
229
+                    $result = $field." like ".$valueparam;
230 230
                     break;
231 231
                 }
232 232
             case Relation::CONTAINS: {
233
-                    $param[$paramName] = "%" . $value . "%";
234
-                    $result = $field . " like " . $valueparam;
233
+                    $param[$paramName] = "%".$value."%";
234
+                    $result = $field." like ".$valueparam;
235 235
                     break;
236 236
                 }
237 237
         }
Please login to merge, or discard this patch.
src/Repository/JsonDataset.php 3 patches
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,9 +53,7 @@
 block discarded – undo
53 53
 
54 54
     /**
55 55
      * @access public
56
-     * @param string $sql
57
-     * @param array $array
58
-     * @return DBIterator
56
+     * @return JsonIterator
59 57
      */
60 58
     public function getIterator($path = "", $throwErr = false)
61 59
     {
Please login to merge, or discard this patch.
Switch Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -23,27 +23,27 @@
 block discarded – undo
23 23
         $lastError = json_last_error();
24 24
         $lastErrorDesc = "";
25 25
         switch ($lastError) {
26
-            case JSON_ERROR_NONE:
27
-                $lastErrorDesc = 'No errors';
28
-                break;
29
-            case JSON_ERROR_DEPTH:
30
-                $lastErrorDesc = 'Maximum stack depth exceeded';
31
-                break;
32
-            case JSON_ERROR_STATE_MISMATCH:
33
-                $lastErrorDesc = 'Underflow or the modes mismatch';
34
-                break;
35
-            case JSON_ERROR_CTRL_CHAR:
36
-                $lastErrorDesc = 'Unexpected control character found';
37
-                break;
38
-            case JSON_ERROR_SYNTAX:
39
-                $lastErrorDesc = 'Syntax error, malformed JSON';
40
-                break;
41
-            case JSON_ERROR_UTF8:
42
-                $lastErrorDesc = 'Malformed UTF-8 characters, possibly incorrectly encoded';
43
-                break;
44
-            default:
45
-                $lastErrorDesc = 'Unknown error';
46
-                break;
26
+        case JSON_ERROR_NONE:
27
+            $lastErrorDesc = 'No errors';
28
+            break;
29
+        case JSON_ERROR_DEPTH:
30
+            $lastErrorDesc = 'Maximum stack depth exceeded';
31
+            break;
32
+        case JSON_ERROR_STATE_MISMATCH:
33
+            $lastErrorDesc = 'Underflow or the modes mismatch';
34
+            break;
35
+        case JSON_ERROR_CTRL_CHAR:
36
+            $lastErrorDesc = 'Unexpected control character found';
37
+            break;
38
+        case JSON_ERROR_SYNTAX:
39
+            $lastErrorDesc = 'Syntax error, malformed JSON';
40
+            break;
41
+        case JSON_ERROR_UTF8:
42
+            $lastErrorDesc = 'Malformed UTF-8 characters, possibly incorrectly encoded';
43
+            break;
44
+        default:
45
+            $lastErrorDesc = 'Unknown error';
46
+            break;
47 47
         }
48 48
 
49 49
         if ($lastError != JSON_ERROR_NONE) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         }
48 48
 
49 49
         if ($lastError != JSON_ERROR_NONE) {
50
-            throw new DatasetException("Invalid JSON string: " . $lastErrorDesc);
50
+            throw new DatasetException("Invalid JSON string: ".$lastErrorDesc);
51 51
         }
52 52
     }
53 53
 
Please login to merge, or discard this patch.
src/Repository/SocketDataset.php 2 patches
Doc Comments   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param type $rowsep
30 30
      * @param type $colsep
31 31
      * @param type $fieldnames
32
-     * @param type $port
32
+     * @param integer $port
33 33
      */
34 34
     public function __construct($server, $path, $rowsep, $colsep, $fieldnames, $port = 80)
35 35
     {
@@ -42,9 +42,7 @@  discard block
 block discarded – undo
42 42
     }
43 43
 
44 44
     /**
45
-     * @param string $sql
46
-     * @param array $array
47
-     * @return DBIterator
45
+     * @return SocketIterator
48 46
      */
49 47
     public function getIterator()
50 48
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@
 block discarded – undo
54 54
         if (!$handle) {
55 55
             throw new DatasetException("Socket error: $errstr ($errno)");
56 56
         } else {
57
-            $out = "GET " . $this->_path . " HTTP/1.1\r\n";
58
-            $out .= "Host: " . $this->_server . "\r\n";
57
+            $out = "GET ".$this->_path." HTTP/1.1\r\n";
58
+            $out .= "Host: ".$this->_server."\r\n";
59 59
             $out .= "Connection: Close\r\n\r\n";
60 60
 
61 61
             fwrite($handle, $out);
Please login to merge, or discard this patch.
src/Repository/SparQLDataset.php 2 patches
Doc Comments   +1 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@  discard block
 block discarded – undo
14 14
 
15 15
     /**
16 16
      *
17
-     * @param string $json
18 17
      */
19 18
     public function __construct($url, $namespaces = null)
20 19
     {
@@ -46,9 +45,7 @@  discard block
 block discarded – undo
46 45
     }
47 46
 
48 47
     /**
49
-     * @param string $sql
50
-     * @param array $array
51
-     * @return DBIterator
48
+     * @return SparQLIterator
52 49
      */
53 50
     public function getIterator($sparql)
54 51
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         }
28 28
 
29 29
         if (function_exists('dba_open')) {
30
-            $cache = sys_get_temp_dir() . "/caps.db";
30
+            $cache = sys_get_temp_dir()."/caps.db";
31 31
             $this->_db->capabilityCache($cache);
32 32
         }
33 33
     }
Please login to merge, or discard this patch.
src/Repository/TextFileDataset.php 2 patches
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,9 +61,7 @@
 block discarded – undo
61 61
 
62 62
     /**
63 63
      * @access public
64
-     * @param string $sql
65
-     * @param array $array
66
-     * @return DBIterator
64
+     * @return TextFileIterator|null
67 65
      */
68 66
     public function getIterator()
69 67
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             $this->_source = $source;
41 41
 
42 42
             if (!file_exists($this->_source)) {
43
-                throw new NotFoundException("The specified file " . $this->_source . " does not exists");
43
+                throw new NotFoundException("The specified file ".$this->_source." does not exists");
44 44
             }
45 45
 
46 46
             $this->_sourceType = "FILE";
Please login to merge, or discard this patch.
src/Repository/XmlDataset.php 1 patch
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,9 +71,7 @@
 block discarded – undo
71 71
 
72 72
     /**
73 73
      * @access public
74
-     * @param string $sql
75
-     * @param array $array
76
-     * @return DBIterator
74
+     * @return XmlIterator
77 75
      */
78 76
     public function getIterator()
79 77
     {
Please login to merge, or discard this patch.
src/Repository/XmlIterator.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -32,6 +32,10 @@
 block discarded – undo
32 32
     private $_current = 0;
33 33
     protected $_registerNS;
34 34
 
35
+    /**
36
+     * @param DOMNodeList $nodeList
37
+     * @param string[] $colNodes
38
+     */
35 39
     public function __construct($nodeList, $colNodes, $registerNS)
36 40
     {
37 41
         if (!($nodeList instanceof DOMNodeList)) {
Please login to merge, or discard this patch.
src/Database/DBPDODriver.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,9 @@
 block discarded – undo
92 92
             foreach ($array as $key => $value) {
93 93
                 $stmt->bindValue(":" . SQLBind::keyAdj($key), $value);
94 94
             }
95
-        } else $stmt = $this->_db->prepare($sql);
95
+        } else {
96
+            $stmt = $this->_db->prepare($sql);
97
+        }
96 98
 
97 99
         return $stmt;
98 100
     }
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -26,15 +26,15 @@  discard block
 block discarded – undo
26 26
 
27 27
         if (is_null($strcnn)) {
28 28
             if ($this->_connectionManagement->getFilePath() != "") {
29
-                $strcnn = $this->_connectionManagement->getDriver() . ":" . $this->_connectionManagement->getFilePath();
29
+                $strcnn = $this->_connectionManagement->getDriver().":".$this->_connectionManagement->getFilePath();
30 30
             } else {
31
-                $strcnn = $this->_connectionManagement->getDriver() . ":dbname=" . $this->_connectionManagement->getDatabase();
31
+                $strcnn = $this->_connectionManagement->getDriver().":dbname=".$this->_connectionManagement->getDatabase();
32 32
                 if ($this->_connectionManagement->getExtraParam("unixsocket") != "") {
33
-                    $strcnn .= ";unix_socket=" . $this->_connectionManagement->getExtraParam("unixsocket");
33
+                    $strcnn .= ";unix_socket=".$this->_connectionManagement->getExtraParam("unixsocket");
34 34
                 } else {
35
-                    $strcnn .= ";host=" . $this->_connectionManagement->getServer();
35
+                    $strcnn .= ";host=".$this->_connectionManagement->getServer();
36 36
                     if ($this->_connectionManagement->getPort() != "") {
37
-                        $strcnn .= ";port=" . $this->_connectionManagement->getPort();
37
+                        $strcnn .= ";port=".$this->_connectionManagement->getPort();
38 38
                     }
39 39
                 }
40 40
             }
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 
43 43
         // Create Connection
44 44
         $this->_db = new PDO($strcnn, $this->_connectionManagement->getUsername(),
45
-            $this->_connectionManagement->getPassword(), (array) $preOptions);
45
+            $this->_connectionManagement->getPassword(), (array)$preOptions);
46 46
         $this->_connectionManagement->setDriver($this->_db->getAttribute(PDO::ATTR_DRIVER_NAME));
47 47
 
48 48
         // Set Specific Attributes
49 49
         $this->_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
50 50
         $this->_db->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
51 51
 
52
-        foreach ((array) $postOptions as $key => $value) {
52
+        foreach ((array)$postOptions as $key => $value) {
53 53
             $this->_db->setAttribute($key, $value);
54 54
         }
55 55
     }
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
             throw new \ByJG\AnyDataset\Exception\NotAvailableException("Extension 'PDO' is not loaded");
61 61
         }
62 62
 
63
-        if (!extension_loaded('pdo_' . strtolower($connMngt->getDriver()))) {
64
-            throw new \ByJG\AnyDataset\Exception\NotAvailableException("Extension 'pdo_" . strtolower($connMngt->getDriver()) . "' is not loaded");
63
+        if (!extension_loaded('pdo_'.strtolower($connMngt->getDriver()))) {
64
+            throw new \ByJG\AnyDataset\Exception\NotAvailableException("Extension 'pdo_".strtolower($connMngt->getDriver())."' is not loaded");
65 65
         }
66 66
 
67
-        $class = '\ByJG\AnyDataset\Database\Pdo' . ucfirst($connMngt->getDriver());
67
+        $class = '\ByJG\AnyDataset\Database\Pdo'.ucfirst($connMngt->getDriver());
68 68
 
69 69
         if (!class_exists($class, true)) {
70 70
             return new DBPDODriver($connMngt, null, null, null);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             list($sql, $array) = SQLBind::parseSQL($this->_connectionManagement, $sql, $array);
91 91
             $stmt = $this->_db->prepare($sql);
92 92
             foreach ($array as $key => $value) {
93
-                $stmt->bindValue(":" . SQLBind::keyAdj($key), $value);
93
+                $stmt->bindValue(":".SQLBind::keyAdj($key), $value);
94 94
             }
95 95
         } else $stmt = $this->_db->prepare($sql);
96 96
 
Please login to merge, or discard this patch.