@@ -220,9 +220,9 @@ |
||
220 | 220 | private static function getUnquotedStatementFragments($statement) |
221 | 221 | { |
222 | 222 | $literal = self::ESCAPED_SINGLE_QUOTED_TEXT . '|' . |
223 | - self::ESCAPED_DOUBLE_QUOTED_TEXT . '|' . |
|
224 | - self::ESCAPED_BACKTICK_QUOTED_TEXT . '|' . |
|
225 | - self::ESCAPED_BRACKET_QUOTED_TEXT; |
|
223 | + self::ESCAPED_DOUBLE_QUOTED_TEXT . '|' . |
|
224 | + self::ESCAPED_BACKTICK_QUOTED_TEXT . '|' . |
|
225 | + self::ESCAPED_BRACKET_QUOTED_TEXT; |
|
226 | 226 | preg_match_all("/([^'\"`\[]+)(?:$literal)?/s", $statement, $fragments, PREG_OFFSET_CAPTURE); |
227 | 227 | |
228 | 228 | return $fragments[1]; |
@@ -157,8 +157,7 @@ |
||
157 | 157 | $count ? |
158 | 158 | // array needles are at {@link \Doctrine\DBAL\ParameterType} constants |
159 | 159 | // + {@link Doctrine\DBAL\Connection::ARRAY_PARAM_OFFSET} |
160 | - array_fill(0, $count, $types[$needle] - Connection::ARRAY_PARAM_OFFSET) : |
|
161 | - [], |
|
160 | + array_fill(0, $count, $types[$needle] - Connection::ARRAY_PARAM_OFFSET) : [], |
|
162 | 161 | array_slice($types, $needle + 1) |
163 | 162 | ); |
164 | 163 |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | $row = $this->stmt->fetch($fetchMode); |
155 | 155 | |
156 | - $iterateRow = $this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL|Connection::PORTABILITY_RTRIM); |
|
156 | + $iterateRow = $this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL | Connection::PORTABILITY_RTRIM); |
|
157 | 157 | $fixCase = ! is_null($this->case) |
158 | 158 | && ($fetchMode === FetchMode::ASSOCIATIVE || $fetchMode === FetchMode::MIXED) |
159 | 159 | && ($this->portability & Connection::PORTABILITY_FIX_CASE); |
@@ -176,12 +176,12 @@ discard block |
||
176 | 176 | $rows = $this->stmt->fetchAll($fetchMode); |
177 | 177 | } |
178 | 178 | |
179 | - $iterateRow = $this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL|Connection::PORTABILITY_RTRIM); |
|
179 | + $iterateRow = $this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL | Connection::PORTABILITY_RTRIM); |
|
180 | 180 | $fixCase = ! is_null($this->case) |
181 | 181 | && ($fetchMode === FetchMode::ASSOCIATIVE || $fetchMode === FetchMode::MIXED) |
182 | 182 | && ($this->portability & Connection::PORTABILITY_FIX_CASE); |
183 | 183 | |
184 | - if ( ! $iterateRow && !$fixCase) { |
|
184 | + if ( ! $iterateRow && ! $fixCase) { |
|
185 | 185 | return $rows; |
186 | 186 | } |
187 | 187 | |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | { |
242 | 242 | $value = $this->stmt->fetchColumn($columnIndex); |
243 | 243 | |
244 | - if ($this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL|Connection::PORTABILITY_RTRIM)) { |
|
244 | + if ($this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL | Connection::PORTABILITY_RTRIM)) { |
|
245 | 245 | if (($this->portability & Connection::PORTABILITY_EMPTY_TO_NULL) && $value === '') { |
246 | 246 | $value = null; |
247 | 247 | } elseif (($this->portability & Connection::PORTABILITY_RTRIM) && is_string($value)) { |
@@ -50,6 +50,6 @@ |
||
50 | 50 | */ |
51 | 51 | public function requiresSQLCommentHint(AbstractPlatform $platform) |
52 | 52 | { |
53 | - return !$platform->hasNativeGuidType(); |
|
53 | + return ! $platform->hasNativeGuidType(); |
|
54 | 54 | } |
55 | 55 | } |
@@ -69,7 +69,7 @@ |
||
69 | 69 | |
70 | 70 | $dateTime = date_create_immutable($value); |
71 | 71 | |
72 | - if (! $dateTime) { |
|
72 | + if ( ! $dateTime) { |
|
73 | 73 | throw ConversionException::conversionFailed($value, $this->getName()); |
74 | 74 | } |
75 | 75 |
@@ -69,7 +69,7 @@ |
||
69 | 69 | return $value; |
70 | 70 | } |
71 | 71 | |
72 | - $val = \DateTime::createFromFormat('!'.$platform->getDateFormatString(), $value); |
|
72 | + $val = \DateTime::createFromFormat('!' . $platform->getDateFormatString(), $value); |
|
73 | 73 | if ( ! $val) { |
74 | 74 | throw ConversionException::conversionFailedFormat($value, $this->getName(), $platform->getDateFormatString()); |
75 | 75 | } |
@@ -68,11 +68,11 @@ |
||
68 | 68 | |
69 | 69 | $dateTime = \DateTimeImmutable::createFromFormat($platform->getDateTimeFormatString(), $value); |
70 | 70 | |
71 | - if (! $dateTime) { |
|
71 | + if ( ! $dateTime) { |
|
72 | 72 | $dateTime = \date_create_immutable($value); |
73 | 73 | } |
74 | 74 | |
75 | - if (! $dateTime) { |
|
75 | + if ( ! $dateTime) { |
|
76 | 76 | throw ConversionException::conversionFailedFormat( |
77 | 77 | $value, |
78 | 78 | $this->getName(), |
@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | public function convertToDatabaseValue($value, AbstractPlatform $platform) |
50 | 50 | { |
51 | - if (!$value) { |
|
51 | + if ( ! $value) { |
|
52 | 52 | return null; |
53 | 53 | } |
54 | 54 |
@@ -68,7 +68,7 @@ |
||
68 | 68 | |
69 | 69 | $dateTime = \DateTimeImmutable::createFromFormat('!' . $platform->getTimeFormatString(), $value); |
70 | 70 | |
71 | - if (! $dateTime) { |
|
71 | + if ( ! $dateTime) { |
|
72 | 72 | throw ConversionException::conversionFailedFormat( |
73 | 73 | $value, |
74 | 74 | $this->getName(), |
@@ -68,7 +68,7 @@ |
||
68 | 68 | |
69 | 69 | $dateTime = \DateTimeImmutable::createFromFormat($platform->getDateTimeTzFormatString(), $value); |
70 | 70 | |
71 | - if (! $dateTime) { |
|
71 | + if ( ! $dateTime) { |
|
72 | 72 | throw ConversionException::conversionFailedFormat( |
73 | 73 | $value, |
74 | 74 | $this->getName(), |