@@ -298,8 +298,8 @@ |
||
| 298 | 298 | { |
| 299 | 299 | foreach ($options as $option => $value) |
| 300 | 300 | { |
| 301 | - if (property_exists(__CLASS__, strtolower($option)) && method_exists($this, 'set'.$option)) |
|
| 302 | - $this->{'set'.$option}($value); |
|
| 301 | + if (property_exists(__CLASS__, strtolower($option)) && method_exists($this, 'set' . $option)) |
|
| 302 | + $this->{'set' . $option}($value); |
|
| 303 | 303 | } |
| 304 | 304 | } |
| 305 | 305 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | { |
| 109 | 109 | if (is_string($param_values[$i])) |
| 110 | 110 | $bind_types .= 's'; |
| 111 | - else if(is_float($param_values[$i])) |
|
| 111 | + else if (is_float($param_values[$i])) |
|
| 112 | 112 | $bind_types .= 'd'; |
| 113 | 113 | # [POSSIBLE BUG] - To Future revision (What about non-string and non-decimal types ?) |
| 114 | 114 | else |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | $this->rowsAffected = $this->result->affected_rows; |
| 165 | 165 | |
| 166 | 166 | if ($this->transac_mode) |
| 167 | - $this->transac_result = is_null($this->transac_result) ? $this->result: $this->transac_result && $this->result; |
|
| 167 | + $this->transac_result = is_null($this->transac_result) ? $this->result : $this->transac_result && $this->result; |
|
| 168 | 168 | |
| 169 | 169 | return $this->result; |
| 170 | 170 | } |
@@ -93,24 +93,24 @@ discard block |
||
| 93 | 93 | { |
| 94 | 94 | foreach ($contents as $i) |
| 95 | 95 | { |
| 96 | - if (is_file($handler.'/'.$i)) |
|
| 96 | + if (is_file($handler . '/' . $i)) |
|
| 97 | 97 | { |
| 98 | - $allContents[] = $handler.'/'.$i; |
|
| 98 | + $allContents[] = $handler . '/' . $i; |
|
| 99 | 99 | |
| 100 | - $this->buffer = $handler.'/'.$i; |
|
| 100 | + $this->buffer = $handler . '/' . $i; |
|
| 101 | 101 | call_user_func($fileCallback, $this); |
| 102 | 102 | } |
| 103 | - elseif (is_dir($handler.'/'.$i)) |
|
| 103 | + elseif (is_dir($handler . '/' . $i)) |
|
| 104 | 104 | { |
| 105 | - $allContents[] = $handler.'/'.$i; |
|
| 105 | + $allContents[] = $handler . '/' . $i; |
|
| 106 | 106 | |
| 107 | - $this->buffer = $handler.'/'.$i; |
|
| 108 | - $this->getContents($handler.'/'.$i, $fileCallback, $dirCallback); |
|
| 107 | + $this->buffer = $handler . '/' . $i; |
|
| 108 | + $this->getContents($handler . '/' . $i, $fileCallback, $dirCallback); |
|
| 109 | 109 | |
| 110 | 110 | $directory = scandir($handler); |
| 111 | 111 | |
| 112 | 112 | if (!count($directory) < 3) |
| 113 | - $this->buffer = $handler.'/'.$i; |
|
| 113 | + $this->buffer = $handler . '/' . $i; |
|
| 114 | 114 | |
| 115 | 115 | call_user_func($dirCallback, $this); |
| 116 | 116 | } |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | if (!empty($path)) |
| 197 | 197 | if (!strlen(stristr($item, $path)) > 0) |
| 198 | 198 | continue; |
| 199 | - if (strstr($item,'~') === false && $item != '.' && $item != '..') |
|
| 199 | + if (strstr($item, '~') === false && $item != '.' && $item != '..') |
|
| 200 | 200 | $filesToReturn[] = $item; |
| 201 | 201 | } |
| 202 | 202 | } |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | if (is_dir($dest)) |
| 300 | 300 | { |
| 301 | 301 | if (!$recursive) |
| 302 | - copy($file, $dest.'/'.$file); |
|
| 302 | + copy($file, $dest . '/' . $file); |
|
| 303 | 303 | else { |
| 304 | 304 | |
| 305 | 305 | $files = array(); |
@@ -318,14 +318,14 @@ discard block |
||
| 318 | 318 | |
| 319 | 319 | foreach ($files[1] as $item) |
| 320 | 320 | { |
| 321 | - if (!file_exists($dest.'/'.$item)) |
|
| 321 | + if (!file_exists($dest . '/' . $item)) |
|
| 322 | 322 | mkdir("$dest/$item", 0777, true); |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | foreach ($files[0] as $item) |
| 326 | 326 | { |
| 327 | 327 | if (!file_exists("$dest/$files")) |
| 328 | - copy($item, $dest.'/'.$item); |
|
| 328 | + copy($item, $dest . '/' . $item); |
|
| 329 | 329 | } |
| 330 | 330 | }); |
| 331 | 331 | } |
@@ -350,12 +350,12 @@ discard block |
||
| 350 | 350 | throw new Exception("Missing parameter for mv!"); |
| 351 | 351 | |
| 352 | 352 | if (is_dir($newfile)) |
| 353 | - $newfile .= '/'.basename($oldfile); |
|
| 353 | + $newfile .= '/' . basename($oldfile); |
|
| 354 | 354 | |
| 355 | 355 | if ($oldfile == $newfile) |
| 356 | 356 | throw new Exception("'$oldfile' and '$newfile' are the same file"); |
| 357 | 357 | |
| 358 | - if(!rename($oldfile, $newfile)) |
|
| 358 | + if (!rename($oldfile, $newfile)) |
|
| 359 | 359 | return false; |
| 360 | 360 | |
| 361 | 361 | return true; |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | else { |
| 386 | 386 | if (!is_dir($dir)) |
| 387 | 387 | { |
| 388 | - if(!mkdir("$dir", 0777)) |
|
| 388 | + if (!mkdir("$dir", 0777)) |
|
| 389 | 389 | return false; |
| 390 | 390 | } |
| 391 | 391 | } |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $exec = sqlsrv_execute($stmt); |
| 117 | 117 | } |
| 118 | 118 | else |
| 119 | - $exec = $this->result = sqlsrv_query($this->dbconn, $sql, $params, array( "Scrollable" => SQLSRV_CURSOR_KEYSET )); |
|
| 119 | + $exec = $this->result = sqlsrv_query($this->dbconn, $sql, $params, array("Scrollable" => SQLSRV_CURSOR_KEYSET)); |
|
| 120 | 120 | |
| 121 | 121 | if ($exec === false) |
| 122 | 122 | { |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $this->rowsAffected = sqlsrv_rows_affected($this->result); |
| 138 | 138 | |
| 139 | 139 | if ($this->transac_mode) |
| 140 | - $this->transac_result = is_null($this->transac_result) ? $this->result: $this->transac_result && $this->result; |
|
| 140 | + $this->transac_result = is_null($this->transac_result) ? $this->result : $this->transac_result && $this->result; |
|
| 141 | 141 | |
| 142 | 142 | return $this->result; |
| 143 | 143 | } |
@@ -108,8 +108,8 @@ |
||
| 108 | 108 | { |
| 109 | 109 | foreach ($options as $option => $value) |
| 110 | 110 | { |
| 111 | - if (property_exists(__CLASS__, strtolower($option)) && method_exists($this, 'set'.$option)) |
|
| 112 | - $this->{'set'.$option}($value); |
|
| 111 | + if (property_exists(__CLASS__, strtolower($option)) && method_exists($this, 'set' . $option)) |
|
| 112 | + $this->{'set' . $option}($value); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | if (!($socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) |
@@ -59,10 +59,10 @@ discard block |
||
| 59 | 59 | ? $this->dbname |
| 60 | 60 | : |
| 61 | 61 | (!is_null($this->dbport) && !empty($this->dbport)) |
| 62 | - ? $this->dbhost .":". $this->dbport ."/". $this->dbname |
|
| 63 | - : $this->dbhost ."/". $this->dbname; |
|
| 62 | + ? $this->dbhost . ":" . $this->dbport . "/" . $this->dbname |
|
| 63 | + : $this->dbhost . "/" . $this->dbname; |
|
| 64 | 64 | |
| 65 | - $conn = @oci_connect($this->dbuser, $this->dbpass, $connection_string, $this->dbchar); |
|
| 65 | + $conn = @oci_connect($this->dbuser, $this->dbpass, $connection_string, $this->dbchar); |
|
| 66 | 66 | |
| 67 | 67 | if ($conn === false) |
| 68 | 68 | { |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $prev_error_handler = set_error_handler(['\Drone\Error\ErrorHandler', 'errorControlOperator'], E_ALL); |
| 132 | 132 | |
| 133 | 133 | // may be throw a Fatal error (Ex: Maximum execution time) |
| 134 | - $r = ($this->transac_mode) ? oci_execute($stid, OCI_NO_AUTO_COMMIT) : oci_execute($stid, OCI_COMMIT_ON_SUCCESS); |
|
| 134 | + $r = ($this->transac_mode) ? oci_execute($stid, OCI_NO_AUTO_COMMIT) : oci_execute($stid, OCI_COMMIT_ON_SUCCESS); |
|
| 135 | 135 | |
| 136 | 136 | set_error_handler($prev_error_handler); |
| 137 | 137 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | $this->numFields = oci_num_fields($stid); |
| 153 | 153 | |
| 154 | 154 | if ($this->transac_mode) |
| 155 | - $this->transac_result = is_null($this->transac_result) ? $stid: $this->transac_result && $stid; |
|
| 155 | + $this->transac_result = is_null($this->transac_result) ? $stid : $this->transac_result && $stid; |
|
| 156 | 156 | |
| 157 | 157 | $this->result = $stid; |
| 158 | 158 | |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | |
| 198 | 198 | if ($this->result) |
| 199 | 199 | { |
| 200 | - while ( ($row = @oci_fetch_array($this->result, OCI_BOTH + OCI_RETURN_NULLS)) !== false ) |
|
| 200 | + while (($row = @oci_fetch_array($this->result, OCI_BOTH + OCI_RETURN_NULLS)) !== false) |
|
| 201 | 201 | { |
| 202 | 202 | $data[] = $row; |
| 203 | 203 | } |