@@ -10,7 +10,7 @@ |
||
| 10 | 10 | |
| 11 | 11 | public function __construct(ConnectionManagement $connMngt) |
| 12 | 12 | { |
| 13 | - $strcnn = $connMngt->getDriver() . ":" . $connMngt->getServer(); |
|
| 13 | + $strcnn = $connMngt->getDriver().":".$connMngt->getServer(); |
|
| 14 | 14 | |
| 15 | 15 | parent::__construct($connMngt, $strcnn, [], []); |
| 16 | 16 | } |
@@ -54,8 +54,8 @@ |
||
| 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); |
@@ -42,10 +42,10 @@ discard block |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | $this->_rows = array(); |
| 45 | - $rowsaux = preg_split("/" . $this->_rowsep . "/", $linha); |
|
| 45 | + $rowsaux = preg_split("/".$this->_rowsep."/", $linha); |
|
| 46 | 46 | sort($rowsaux); |
| 47 | 47 | foreach ($rowsaux as $key => $value) { |
| 48 | - $colsaux = preg_split("/" . $this->_colsep . "/", $value); |
|
| 48 | + $colsaux = preg_split("/".$this->_colsep."/", $value); |
|
| 49 | 49 | if (sizeof($colsaux) == sizeof($fieldnames)) { |
| 50 | 50 | $this->_rows[] = $value; |
| 51 | 51 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | public function moveNext() |
| 80 | 80 | { |
| 81 | - $cols = preg_split("/" . $this->_colsep . "/", $this->_rows[$this->_current]); |
|
| 81 | + $cols = preg_split("/".$this->_colsep."/", $this->_rows[$this->_current]); |
|
| 82 | 82 | $this->_current++; |
| 83 | 83 | |
| 84 | 84 | $sr = new SingleRow(); |
@@ -47,7 +47,7 @@ |
||
| 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 | |
@@ -218,7 +218,7 @@ |
||
| 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 | |
@@ -27,7 +27,7 @@ |
||
| 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 | } |
@@ -40,7 +40,7 @@ |
||
| 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"; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $campos .= ", "; |
| 80 | 80 | $valores .= ", "; |
| 81 | 81 | } |
| 82 | - $campos .= $this->fieldDeliLeft . $fieldname . $this->fieldDeliRight; |
|
| 82 | + $campos .= $this->fieldDeliLeft.$fieldname.$this->fieldDeliRight; |
|
| 83 | 83 | $valores .= $this->getValue($fieldname, $fieldvalue, $param, $decimalpoint); |
| 84 | 84 | } |
| 85 | 85 | $sql = "insert into $table ($campos) values ($valores)"; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | protected function getValue($name, $valores, &$param, $decimalpoint) |
| 105 | 105 | { |
| 106 | - $paramName = "[[" . $name . "]]"; |
|
| 106 | + $paramName = "[[".$name."]]"; |
|
| 107 | 107 | if (!is_array($valores)) { |
| 108 | 108 | $valores = array(SQLFieldType::TEXT, $valores); |
| 109 | 109 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | if (strlen($sql) > 4) { |
| 152 | 152 | $sql .= ' and '; |
| 153 | 153 | } |
| 154 | - $sql = " $fieldName " . $relation . " " . $this->getValue($fieldName, $value, $param, '.'); |
|
| 154 | + $sql = " $fieldName ".$relation." ".$this->getValue($fieldName, $value, $param, '.'); |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | public function setFieldDelimeters($left, $right) |
@@ -27,16 +27,16 @@ discard block |
||
| 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=" . |
|
| 32 | + $strcnn = $this->connectionManagement->getDriver().":dbname=". |
|
| 33 | 33 | $this->connectionManagement->getDatabase(); |
| 34 | 34 | if ($this->connectionManagement->getExtraParam("unixsocket") != "") { |
| 35 | - $strcnn .= ";unix_socket=" . $this->connectionManagement->getExtraParam("unixsocket"); |
|
| 35 | + $strcnn .= ";unix_socket=".$this->connectionManagement->getExtraParam("unixsocket"); |
|
| 36 | 36 | } else { |
| 37 | - $strcnn .= ";host=" . $this->connectionManagement->getServer(); |
|
| 37 | + $strcnn .= ";host=".$this->connectionManagement->getServer(); |
|
| 38 | 38 | if ($this->connectionManagement->getPort() != "") { |
| 39 | - $strcnn .= ";port=" . $this->connectionManagement->getPort(); |
|
| 39 | + $strcnn .= ";port=".$this->connectionManagement->getPort(); |
|
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $strcnn, |
| 48 | 48 | $this->connectionManagement->getUsername(), |
| 49 | 49 | $this->connectionManagement->getPassword(), |
| 50 | - (array) $preOptions |
|
| 50 | + (array)$preOptions |
|
| 51 | 51 | ); |
| 52 | 52 | $this->connectionManagement->setDriver($this->instance->getAttribute(PDO::ATTR_DRIVER_NAME)); |
| 53 | 53 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $this->instance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
| 56 | 56 | $this->instance->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); |
| 57 | 57 | |
| 58 | - foreach ((array) $postOptions as $key => $value) { |
|
| 58 | + foreach ((array)$postOptions as $key => $value) { |
|
| 59 | 59 | $this->instance->setAttribute($key, $value); |
| 60 | 60 | } |
| 61 | 61 | } |
@@ -66,11 +66,11 @@ discard block |
||
| 66 | 66 | throw new NotAvailableException("Extension 'PDO' is not loaded"); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - if (!extension_loaded('pdo_' . strtolower($connMngt->getDriver()))) { |
|
| 70 | - throw new NotAvailableException("Extension 'pdo_" . strtolower($connMngt->getDriver()) . "' is not loaded"); |
|
| 69 | + if (!extension_loaded('pdo_'.strtolower($connMngt->getDriver()))) { |
|
| 70 | + throw new NotAvailableException("Extension 'pdo_".strtolower($connMngt->getDriver())."' is not loaded"); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - $class = '\ByJG\AnyDataset\Database\Pdo' . ucfirst($connMngt->getDriver()); |
|
| 73 | + $class = '\ByJG\AnyDataset\Database\Pdo'.ucfirst($connMngt->getDriver()); |
|
| 74 | 74 | |
| 75 | 75 | if (!class_exists($class, true)) { |
| 76 | 76 | return new DbPdoDriver($connMngt, null, null, null); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | list($sql, $array) = SqlBind::parseSQL($this->connectionManagement, $sql, $array); |
| 97 | 97 | $stmt = $this->instance->prepare($sql); |
| 98 | 98 | foreach ($array as $key => $value) { |
| 99 | - $stmt->bindValue(":" . SqlBind::keyAdj($key), $value); |
|
| 99 | + $stmt->bindValue(":".SqlBind::keyAdj($key), $value); |
|
| 100 | 100 | } |
| 101 | 101 | } else { |
| 102 | 102 | $stmt = $this->instance->prepare($sql); |