Completed
Branch master (a2888f)
by Joao
08:30 queued 04:22
created
src/Repository/JsonDataset.php 1 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/SingleRow.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@
 block discarded – undo
218 218
         if (is_array($this->_row)) {
219 219
             return json_decode(json_encode($this->_row));
220 220
         } else {
221
-            throw new UnexpectedValueException('I expected that getRawFormat is array() but ' . gettype($this->_row) . ' was given');
221
+            throw new UnexpectedValueException('I expected that getRawFormat is array() but '.gettype($this->_row).' was given');
222 222
         }
223 223
     }
224 224
 
Please login to merge, or discard this patch.
src/Repository/SparQLDataset.php 1 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 1 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/FixedTextFileDataset.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
         if (!preg_match("~^https?://~", $source)) {
40 40
             if (!file_exists($this->_source)) {
41
-                throw new NotFoundException("The specified file " . $this->_source . " does not exists");
41
+                throw new NotFoundException("The specified file ".$this->_source." does not exists");
42 42
             }
43 43
 
44 44
             $this->_sourceType = "FILE";
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
         if (!$handle) {
76 76
             throw new DatasetException("TextFileDataset Socket error: $errstr ($errno)");
77 77
         } else {
78
-            $out = "GET " . $urlParts[4] . " HTTP/1.1\r\n";
79
-            $out .= "Host: " . $urlParts[2] . "\r\n";
78
+            $out = "GET ".$urlParts[4]." HTTP/1.1\r\n";
79
+            $out .= "Host: ".$urlParts[2]."\r\n";
80 80
             $out .= "Connection: Close\r\n\r\n";
81 81
 
82 82
             fwrite($handle, $out);
Please login to merge, or discard this patch.
src/Repository/FixedTextFileIterator.php 1 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/AnyDataset.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                     if (!is_null($attr)) {
105 105
                         $sr->addField($attr->nodeValue, $field->nodeValue);
106 106
                     } else {
107
-                        throw new \InvalidArgumentException('Malformed anydataset file ' . basename($filepath));
107
+                        throw new \InvalidArgumentException('Malformed anydataset file '.basename($filepath));
108 108
                     }
109 109
                 }
110 110
                 $sr->acceptChanges();
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
         $x = $y = array();
317 317
 
318 318
         $cntSeq = count($seq);
319
-        for ($i = 1; $i < $cntSeq; $i ++) {
319
+        for ($i = 1; $i < $cntSeq; $i++) {
320 320
             if ($seq[$i]->getField($field) <= $k->getField($field)) {
321 321
                 $x [] = $seq [$i];
322 322
             } else {
Please login to merge, or discard this patch.
src/Database/DBPDODriver.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -27,15 +27,15 @@  discard block
 block discarded – undo
27 27
 
28 28
         if (is_null($strcnn)) {
29 29
             if ($this->_connectionManagement->getFilePath() != "") {
30
-                $strcnn = $this->_connectionManagement->getDriver() . ":" . $this->_connectionManagement->getFilePath();
30
+                $strcnn = $this->_connectionManagement->getDriver().":".$this->_connectionManagement->getFilePath();
31 31
             } else {
32
-                $strcnn = $this->_connectionManagement->getDriver() . ":dbname=" . $this->_connectionManagement->getDatabase();
32
+                $strcnn = $this->_connectionManagement->getDriver().":dbname=".$this->_connectionManagement->getDatabase();
33 33
                 if ($this->_connectionManagement->getExtraParam("unixsocket") != "") {
34
-                    $strcnn .= ";unix_socket=" . $this->_connectionManagement->getExtraParam("unixsocket");
34
+                    $strcnn .= ";unix_socket=".$this->_connectionManagement->getExtraParam("unixsocket");
35 35
                 } else {
36
-                    $strcnn .= ";host=" . $this->_connectionManagement->getServer();
36
+                    $strcnn .= ";host=".$this->_connectionManagement->getServer();
37 37
                     if ($this->_connectionManagement->getPort() != "") {
38
-                        $strcnn .= ";port=" . $this->_connectionManagement->getPort();
38
+                        $strcnn .= ";port=".$this->_connectionManagement->getPort();
39 39
                     }
40 40
                 }
41 41
             }
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
 
44 44
         // Create Connection
45 45
         $this->_db = new PDO($strcnn, $this->_connectionManagement->getUsername(),
46
-            $this->_connectionManagement->getPassword(), (array) $preOptions);
46
+            $this->_connectionManagement->getPassword(), (array)$preOptions);
47 47
         $this->_connectionManagement->setDriver($this->_db->getAttribute(PDO::ATTR_DRIVER_NAME));
48 48
 
49 49
         // Set Specific Attributes
50 50
         $this->_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
51 51
         $this->_db->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
52 52
 
53
-        foreach ((array) $postOptions as $key => $value) {
53
+        foreach ((array)$postOptions as $key => $value) {
54 54
             $this->_db->setAttribute($key, $value);
55 55
         }
56 56
     }
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
             throw new NotAvailableException("Extension 'PDO' is not loaded");
62 62
         }
63 63
 
64
-        if (!extension_loaded('pdo_' . strtolower($connMngt->getDriver()))) {
65
-            throw new NotAvailableException("Extension 'pdo_" . strtolower($connMngt->getDriver()) . "' is not loaded");
64
+        if (!extension_loaded('pdo_'.strtolower($connMngt->getDriver()))) {
65
+            throw new NotAvailableException("Extension 'pdo_".strtolower($connMngt->getDriver())."' is not loaded");
66 66
         }
67 67
 
68
-        $class = '\ByJG\AnyDataset\Database\Pdo' . ucfirst($connMngt->getDriver());
68
+        $class = '\ByJG\AnyDataset\Database\Pdo'.ucfirst($connMngt->getDriver());
69 69
 
70 70
         if (!class_exists($class, true)) {
71 71
             return new DBPDODriver($connMngt, null, null, null);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             list($sql, $array) = SQLBind::parseSQL($this->_connectionManagement, $sql, $array);
92 92
             $stmt = $this->_db->prepare($sql);
93 93
             foreach ($array as $key => $value) {
94
-                $stmt->bindValue(":" . SQLBind::keyAdj($key), $value);
94
+                $stmt->bindValue(":".SQLBind::keyAdj($key), $value);
95 95
             }
96 96
         } else $stmt = $this->_db->prepare($sql);
97 97
 
Please login to merge, or discard this patch.
src/Repository/DBDataset.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -140,12 +140,12 @@  discard block
 block discarded – undo
140 140
 
141 141
         // Define the query key
142 142
         if (is_array($arKey2) && count($arKey2) > 0) {
143
-            $key2 = ":" . md5(json_encode($arKey2));
143
+            $key2 = ":".md5(json_encode($arKey2));
144 144
         } else {
145 145
             $key2 = "";
146 146
         }
147 147
 
148
-        return  "qry:" . $key1 . $key2;
148
+        return  "qry:".$key1.$key2;
149 149
     }
150 150
 
151 151
     public function getScalar($sql, $array = null)
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     public function getDbFunctions()
229 229
     {
230 230
         if (is_null($this->_dbFunction)) {
231
-            $dbFunc = "\\ByJG\\AnyDataset\\Database\\DB" . ucfirst($this->_connectionManagement->getDriver()) . "Functions";
231
+            $dbFunc = "\\ByJG\\AnyDataset\\Database\\DB".ucfirst($this->_connectionManagement->getDriver())."Functions";
232 232
             $this->_dbFunction = new $dbFunc();
233 233
         }
234 234
 
Please login to merge, or discard this patch.