Skip to content

Commit 636a872

Browse files
author
vladimir.reznichenko
committed
SCA: reverted code style changes
1 parent c926b1a commit 636a872

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Symfony/Component/Filesystem/Filesystem.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ public function copy($originFile, $targetFile, $overwriteNewerFiles = false)
5454

5555
if ($doCopy) {
5656
// https://bugs.php.net/bug.php?id=64634
57-
if (false === $source = @fopen($originFile, 'rb')) {
57+
if (false === $source = @fopen($originFile, 'r')) {
5858
throw new IOException(sprintf('Failed to copy "%s" to "%s" because source file could not be opened for reading.', $originFile, $targetFile), 0, null, $originFile);
5959
}
6060

6161
// Stream context created to allow files overwrite when using FTP stream wrapper - disabled by default
62-
if (false === $target = @fopen($targetFile, 'wb', null, stream_context_create(array('ftp' => array('overwrite' => true))))) {
62+
if (false === $target = @fopen($targetFile, 'w', null, stream_context_create(array('ftp' => array('overwrite' => true))))) {
6363
throw new IOException(sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing.', $originFile, $targetFile), 0, null, $originFile);
6464
}
6565

@@ -647,7 +647,7 @@ public function tempnam($dir, $prefix)
647647

648648
// Use fopen instead of file_exists as some streams do not support stat
649649
// Use mode 'x+' to atomically check existence and create to avoid a TOCTOU vulnerability
650-
$handle = @fopen($tmpFile, 'x+b');
650+
$handle = @fopen($tmpFile, 'x+');
651651

652652
// If unsuccessful restart the loop
653653
if (false === $handle) {

src/Symfony/Component/Messenger/Asynchronous/Routing/SenderLocator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public static function getValueFromMessageRouting(array $mapping, $message)
5757
if ($interfaceMapping = array_intersect_key($mapping, class_implements($message))) {
5858
return current($interfaceMapping);
5959
}
60+
6061
return $mapping['*'] ?? null;
6162
}
6263
}

0 commit comments

Comments
 (0)