Skip to content

Commit 6d44e06

Browse files
committed
- add explicit return types to avoid deprecations alerts on sf5.4
1 parent a2bffca commit 6d44e06

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/Uploadable/MimeTypeGuesserAdapter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
class MimeTypeGuesserAdapter implements MimeTypeGuesserInterface
99
{
10+
/**
11+
* @param $filePath
12+
* @return ?string
13+
*/
1014
public function guess($filePath)
1115
{
1216
return MimeTypes::getDefault()->guessMimeType($filePath);

src/Uploadable/UploadedFileInfo.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,50 @@ public function __construct(UploadedFile $uploadedFile)
1414
$this->uploadedFile = $uploadedFile;
1515
}
1616

17+
/**
18+
* @return ?string
19+
*/
1720
public function getTmpName()
1821
{
1922
return $this->uploadedFile->getPathname();
2023
}
2124

25+
/**
26+
* @return ?string
27+
*/
2228
public function getName()
2329
{
2430
return $this->uploadedFile->getClientOriginalName();
2531
}
2632

33+
/**
34+
* @return ?string
35+
*/
2736
public function getSize()
2837
{
2938
return $this->uploadedFile->getSize();
3039
}
3140

41+
/**
42+
* @return ?string
43+
*/
3244
public function getType()
3345
{
3446
return $this->uploadedFile->getMimeType();
3547
}
3648

49+
/**
50+
* @return int
51+
*/
3752
public function getError()
3853
{
3954
return $this->uploadedFile->getError();
4055
}
4156

4257
/**
4358
* {@inheritDoc}
59+
*
60+
* @return bool
4461
*/
4562
public function isUploadedFile()
4663
{

0 commit comments

Comments
 (0)