@@ -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"; |
@@ -38,7 +38,7 @@ discard block |
||
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 |
||
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); |
@@ -152,6 +152,9 @@ |
||
152 | 152 | $this->_fieldDeliRight = $right; |
153 | 153 | } |
154 | 154 | |
155 | + /** |
|
156 | + * @param string $sql |
|
157 | + */ |
|
155 | 158 | public static function createSafeSQL($sql, $list) |
156 | 159 | { |
157 | 160 | foreach ($list as $key => $value) { |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | if ($sql != "") { |
57 | 57 | $sql .= ", "; |
58 | 58 | } |
59 | - $sql .= " " . $this->_fieldDeliLeft . $fieldname . $this->_fieldDeliRight . " = " . $this->getValue($fieldname, |
|
60 | - $fieldvalue, $param, $decimalpoint) . " "; |
|
59 | + $sql .= " ".$this->_fieldDeliLeft.$fieldname.$this->_fieldDeliRight." = ".$this->getValue($fieldname, |
|
60 | + $fieldvalue, $param, $decimalpoint)." "; |
|
61 | 61 | } |
62 | 62 | $sql = "update $table set $sql where $filter "; |
63 | 63 | } elseif ($type == SQLType::SQL_INSERT) { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $campos .= ", "; |
69 | 69 | $valores .= ", "; |
70 | 70 | } |
71 | - $campos .= $this->_fieldDeliLeft . $fieldname . $this->_fieldDeliRight; |
|
71 | + $campos .= $this->_fieldDeliLeft.$fieldname.$this->_fieldDeliRight; |
|
72 | 72 | $valores .= $this->getValue($fieldname, $fieldvalue, $param, $decimalpoint); |
73 | 73 | } |
74 | 74 | $sql = "insert into $table ($campos) values ($valores)"; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | protected function getValue($name, $valores, &$param, $decimalpoint) |
94 | 94 | { |
95 | - $paramName = "[[" . $name . "]]"; |
|
95 | + $paramName = "[[".$name."]]"; |
|
96 | 96 | if (!is_array($valores)) { |
97 | 97 | $valores = array(SQLFieldType::TEXT, $valores); |
98 | 98 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | if (strlen($sql) > 4) { |
141 | 141 | $sql .= ' and '; |
142 | 142 | } |
143 | - $sql = " $fieldName " . $relation . " " . $this->getValue($fieldName, $value, $param, '.'); |
|
143 | + $sql = " $fieldName ".$relation." ".$this->getValue($fieldName, $value, $param, '.'); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | public function setFieldDelimeters($left, $right) |
@@ -71,7 +71,7 @@ |
||
71 | 71 | |
72 | 72 | /** |
73 | 73 | * @access public |
74 | - * @return DBIterator |
|
74 | + * @return XmlIterator |
|
75 | 75 | */ |
76 | 76 | public function getIterator() |
77 | 77 | { |
@@ -32,6 +32,11 @@ |
||
32 | 32 | private $_current = 0; |
33 | 33 | protected $_registerNS; |
34 | 34 | |
35 | + /** |
|
36 | + * @param DOMNodeList $nodeList |
|
37 | + * @param string[] $colNodes |
|
38 | + * @param string $registerNS |
|
39 | + */ |
|
35 | 40 | public function __construct($nodeList, $colNodes, $registerNS) |
36 | 41 | { |
37 | 42 | if (!($nodeList instanceof DOMNodeList)) { |
@@ -152,6 +152,9 @@ |
||
152 | 152 | $this->_fieldDeliRight = $right; |
153 | 153 | } |
154 | 154 | |
155 | + /** |
|
156 | + * @param string $sql |
|
157 | + */ |
|
155 | 158 | public static function createSafeSQL($sql, $list) |
156 | 159 | { |
157 | 160 | foreach ($list as $key => $value) { |
@@ -140,12 +140,12 @@ discard block |
||
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 |
||
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 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | function limit($sql, $start, $qty) |
24 | 24 | { |
25 | 25 | if (strpos($sql, ' LIMIT ') === false) { |
26 | - return $sql . " LIMIT $start, $qty "; |
|
26 | + return $sql." LIMIT $start, $qty "; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | return $sql; |