@@ -49,9 +49,9 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | public function __toString() |
| 51 | 51 | { |
| 52 | - return PHP_EOL . 'load: ' |
|
| 52 | + return PHP_EOL.'load: ' |
|
| 53 | 53 | . json_encode($this->load) |
| 54 | - . PHP_EOL . 'alterations: ' |
|
| 54 | + . PHP_EOL.'alterations: ' |
|
| 55 | 55 | . json_encode(array_keys($this->alterations)); |
| 56 | 56 | } |
| 57 | 57 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | // replaces empty strings with null or default value |
| 165 | - if (trim('' . $datass[$field_name]) === '' && $attributes->nullable()) { |
|
| 165 | + if (trim(''.$datass[$field_name]) === '' && $attributes->nullable()) { |
|
| 166 | 166 | $datass[$field_name] = $attributes->nullable() ? null : $attributes->default(); |
| 167 | 167 | } |
| 168 | 168 | |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | |
| 221 | 221 | $unique_match = $this->connection->schema()->matchUniqueness($this->table, $this->load); |
| 222 | 222 | |
| 223 | - if(empty($unique_match)){ |
|
| 223 | + if (empty($unique_match)) { |
|
| 224 | 224 | throw new CruditesException('UNIQUE_MATCH_NOT_FOUND'); |
| 225 | 225 | } |
| 226 | 226 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $pdo_statement = $this->executed ?? $this->prepared; |
| 62 | 62 | |
| 63 | 63 | if ($pdo_statement === null) |
| 64 | - throw new CruditesException('both executed and prepared instances are null, cannot call PDOStatement method ' . $method); |
|
| 64 | + throw new CruditesException('both executed and prepared instances are null, cannot call PDOStatement method '.$method); |
|
| 65 | 65 | |
| 66 | 66 | if (!method_exists($pdo_statement, $method)) |
| 67 | 67 | throw new \BadMethodCallException("method $method not found in PDOStatement instance"); |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | throw new CruditesException('PDO_PREPARE_STRING'); |
| 117 | 117 | } catch (\PDOException $e) { |
| 118 | - throw new CruditesException('PDO_EXCEPTION: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 118 | + throw new CruditesException('PDO_EXCEPTION: '.$e->getMessage(), $e->getCode(), $e); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | return $this; |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | */ |
| 138 | 138 | public function ret($mode = \PDO::FETCH_ASSOC, $fetch_argument = null, $ctor_args = null) |
| 139 | 139 | { |
| 140 | - if($mode === \PDO::FETCH_CLASS) |
|
| 140 | + if ($mode === \PDO::FETCH_CLASS) |
|
| 141 | 141 | return $this->executed->fetchAll($mode, $fetch_argument, $ctor_args); |
| 142 | 142 | |
| 143 | 143 | return $this->executed->fetchAll($mode); |