minor #36837 UploadedFile minor fixes (vudaltsov)
This PR was merged into the 3.4 branch. Discussion ---------- UploadedFile minor fixes | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | none <!-- prefix each issue number with "Fix #", if any --> | License | MIT | Doc PR | no According to the [constructor assignments](cb7e78c809/src/Symfony/Component/HttpFoundation/File/UploadedFile.php (L60)
), properties `$originalName` and `$mimeType` are never null in `UploadedFile`, so `getClientOriginalName()` and `getClientMimeType()` always return `string`. Also `$test` does not need a default value because it's always set in the constructor. Commits -------eb8d626c27
Properties $originalName and $mimeType are never null in UploadedFile
This commit is contained in:
commit
2468314e94
@ -24,7 +24,7 @@ use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser;
|
||||
*/
|
||||
class UploadedFile extends File
|
||||
{
|
||||
private $test = false;
|
||||
private $test;
|
||||
private $originalName;
|
||||
private $mimeType;
|
||||
private $size;
|
||||
@ -72,7 +72,7 @@ class UploadedFile extends File
|
||||
* It is extracted from the request from which the file has been uploaded.
|
||||
* Then it should not be considered as a safe value.
|
||||
*
|
||||
* @return string|null The original name
|
||||
* @return string The original name
|
||||
*/
|
||||
public function getClientOriginalName()
|
||||
{
|
||||
@ -101,7 +101,7 @@ class UploadedFile extends File
|
||||
* For a trusted mime type, use getMimeType() instead (which guesses the mime
|
||||
* type based on the file content).
|
||||
*
|
||||
* @return string|null The mime type
|
||||
* @return string The mime type
|
||||
*
|
||||
* @see getMimeType()
|
||||
*/
|
||||
|
Reference in New Issue
Block a user