@@ -42,14 +42,14 @@ |
||
| 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 | } |
@@ -92,7 +92,9 @@ |
||
| 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 | } |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | sqlrcur_prepareQuery($cur, $sql); |
| 57 | 57 | $bindCount = 1; |
| 58 | 58 | foreach ($array as $key => $value) { |
| 59 | - $field = strval($bindCount ++); |
|
| 59 | + $field = strval($bindCount++); |
|
| 60 | 60 | sqlrcur_inputBind($cur, $field, $value); |
| 61 | 61 | } |
| 62 | 62 | $success = sqlrcur_executeQuery($cur); |
@@ -68,12 +68,16 @@ |
||
| 68 | 68 | */ |
| 69 | 69 | function sqlDate($fmt, $col = false) |
| 70 | 70 | { |
| 71 | - if (!$col) $col = "getdate()"; |
|
| 71 | + if (!$col) { |
|
| 72 | + $col = "getdate()"; |
|
| 73 | + } |
|
| 72 | 74 | $s = ''; |
| 73 | 75 | |
| 74 | 76 | $len = strlen($fmt); |
| 75 | 77 | for ($i = 0; $i < $len; $i++) { |
| 76 | - if ($s) $s .= '+'; |
|
| 78 | + if ($s) { |
|
| 79 | + $s .= '+'; |
|
| 80 | + } |
|
| 77 | 81 | $ch = $fmt[$i]; |
| 78 | 82 | switch ($ch) { |
| 79 | 83 | case 'Y': |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | break; |
| 99 | 99 | |
| 100 | 100 | case 'H': |
| 101 | - $s.= 'HH24'; |
|
| 101 | + $s .= 'HH24'; |
|
| 102 | 102 | break; |
| 103 | 103 | |
| 104 | 104 | case 'h': |
@@ -69,7 +69,9 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | function sqlDate($fmt, $col = false) |
| 71 | 71 | { |
| 72 | - if (!$col) $col = $this->sysTimeStamp; |
|
| 72 | + if (!$col) { |
|
| 73 | + $col = $this->sysTimeStamp; |
|
| 74 | + } |
|
| 73 | 75 | $s = 'TO_CHAR(' . $col . ",'"; |
| 74 | 76 | |
| 75 | 77 | $len = strlen($fmt); |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | } elseif ($valores[0] == SQLFieldType::DATE) { |
| 110 | 110 | $date = ($valores[1] instanceof DateTime ? $valores[1]->format(DBBaseFunctions::YMDH) : $valores[1]); |
| 111 | 111 | $param[$name] = $date; |
| 112 | - if (($this->_db->getDbType() == 'oci8') || ( ($this->_db->getDbType() == 'dsn') && (strpos($this->_db->getDbConnectionString(), |
|
| 112 | + if (($this->_db->getDbType() == 'oci8') || (($this->_db->getDbType() == 'dsn') && (strpos($this->_db->getDbConnectionString(), |
|
| 113 | 113 | "oci8")))) { |
| 114 | 114 | return "TO_DATE($paramName, 'YYYY-MM-DD')"; |
| 115 | 115 | } else { |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | break; |
| 138 | 138 | } |
| 139 | 139 | } |
| 140 | - $s.="')"; |
|
| 140 | + $s .= "')"; |
|
| 141 | 141 | if ($concat) $s = "CONCAT($s)"; |
| 142 | 142 | return $s; |
| 143 | 143 | } |
@@ -75,7 +75,9 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | function sqlDate($fmt, $col = false) |
| 77 | 77 | { |
| 78 | - if (!$col) $col = $this->sysTimeStamp; |
|
| 78 | + if (!$col) { |
|
| 79 | + $col = $this->sysTimeStamp; |
|
| 80 | + } |
|
| 79 | 81 | $s = 'DATE_FORMAT(' . $col . ",'"; |
| 80 | 82 | $concat = false; |
| 81 | 83 | $len = strlen($fmt); |
@@ -90,8 +92,11 @@ discard block |
||
| 90 | 92 | case 'q': |
| 91 | 93 | $s .= "'),Quarter($col)"; |
| 92 | 94 | |
| 93 | - if ($len > $i + 1) $s .= ",DATE_FORMAT($col,'"; |
|
| 94 | - else $s .= ",('"; |
|
| 95 | + if ($len > $i + 1) { |
|
| 96 | + $s .= ",DATE_FORMAT($col,'"; |
|
| 97 | + } else { |
|
| 98 | + $s .= ",('"; |
|
| 99 | + } |
|
| 95 | 100 | $concat = true; |
| 96 | 101 | break; |
| 97 | 102 | case 'M': |
@@ -138,7 +143,9 @@ discard block |
||
| 138 | 143 | } |
| 139 | 144 | } |
| 140 | 145 | $s.="')"; |
| 141 | - if ($concat) $s = "CONCAT($s)"; |
|
| 146 | + if ($concat) { |
|
| 147 | + $s = "CONCAT($s)"; |
|
| 148 | + } |
|
| 142 | 149 | return $s; |
| 143 | 150 | } |
| 144 | 151 | |
@@ -27,7 +27,9 @@ discard block |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | if ($path != "") { |
| 30 | - if ($path[0] == "/") $path = substr($path, 1); |
|
| 30 | + if ($path[0] == "/") { |
|
| 31 | + $path = substr($path, 1); |
|
| 32 | + } |
|
| 31 | 33 | |
| 32 | 34 | $pathAr = explode("/", $path); |
| 33 | 35 | |
@@ -44,7 +46,9 @@ discard block |
||
| 44 | 46 | } |
| 45 | 47 | } |
| 46 | 48 | $this->_jsonObject = $newjsonObject; |
| 47 | - } else $this->_jsonObject = $jsonObject; |
|
| 49 | + } else { |
|
| 50 | + $this->_jsonObject = $jsonObject; |
|
| 51 | + } |
|
| 48 | 52 | |
| 49 | 53 | $this->_current = 0; |
| 50 | 54 | } |
@@ -26,7 +26,9 @@ |
||
| 26 | 26 | |
| 27 | 27 | $this->_array = array(); |
| 28 | 28 | |
| 29 | - if (!$array) return; |
|
| 29 | + if (!$array) { |
|
| 30 | + return; |
|
| 31 | + } |
|
| 30 | 32 | |
| 31 | 33 | if (is_array($array)) { |
| 32 | 34 | foreach ($array as $key => $value) { |
@@ -264,7 +264,9 @@ |
||
| 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) { |