Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ea92420

Browse filesBrowse files
committed
More code standards revisions on conditionals
1 parent 5765b15 commit ea92420
Copy full SHA for ea92420

File tree

Expand file treeCollapse file tree

1 file changed

+2
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-4
lines changed

‎src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,15 @@ public function write($id, $data)
182182
$stmt->bindParam(':data', $encoded, \PDO::PARAM_STR);
183183
$stmt->bindValue(':time', time(), \PDO::PARAM_INT);
184184
$stmt->execute();
185-
}
186-
elseif('oci' === $driver) {
185+
} elseif ('oci' === $driver) {
187186
$stmt = $this->pdo->prepare("MERGE INTO $dbTable USING DUAL ON($dbIdCol = :id) ".
188187
"WHEN NOT MATCHED THEN INSERT ($dbIdCol, $dbDataCol, $dbTimeCol) VALUES (:id, :data, sysdate) " .
189188
"WHEN MATCHED THEN UPDATE SET $dbDataCol = :data WHERE $dbIdCol = :id");
190189

191190
$stmt->bindParam(':id', $id, \PDO::PARAM_STR);
192191
$stmt->bindParam(':data', $encoded, \PDO::PARAM_STR);
193192
$stmt->execute();
194-
}
195-
else {
193+
} else {
196194
$stmt = $this->pdo->prepare("UPDATE $dbTable SET $dbDataCol = :data, $dbTimeCol = :time WHERE $dbIdCol = :id");
197195
$stmt->bindParam(':id', $id, \PDO::PARAM_STR);
198196
$stmt->bindParam(':data', $encoded, \PDO::PARAM_STR);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.