minor #30019 [Mime] improve some types in docblocks (xabbuh)
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Mime] improve some types in docblocks
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
27463daced
[Mime] improve some types in docblocks
This commit is contained in:
commit
d18aa4d11b
@ -28,7 +28,7 @@ interface MimeTypeGuesserInterface
|
|||||||
*
|
*
|
||||||
* @param string $path The path to the file
|
* @param string $path The path to the file
|
||||||
*
|
*
|
||||||
* @return string The MIME type or null, if none could be guessed
|
* @return string|null The MIME type or null, if none could be guessed
|
||||||
*
|
*
|
||||||
* @throws \LogicException If the guesser is not supported
|
* @throws \LogicException If the guesser is not supported
|
||||||
* @throws \InvalidArgumentException If the file does not exist or is not readable
|
* @throws \InvalidArgumentException If the file does not exist or is not readable
|
||||||
|
@ -35,6 +35,10 @@ namespace Symfony\Component\Mime;
|
|||||||
final class MimeTypes implements MimeTypesInterface
|
final class MimeTypes implements MimeTypesInterface
|
||||||
{
|
{
|
||||||
private $extensions = [];
|
private $extensions = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var MimeTypeGuesserInterface[]
|
||||||
|
*/
|
||||||
private $guessers = [];
|
private $guessers = [];
|
||||||
private static $default;
|
private static $default;
|
||||||
|
|
||||||
|
@ -19,14 +19,14 @@ interface MimeTypesInterface extends MimeTypeGuesserInterface
|
|||||||
/**
|
/**
|
||||||
* Gets the extensions for the given MIME type.
|
* Gets the extensions for the given MIME type.
|
||||||
*
|
*
|
||||||
* @return array an array of extensions (first one is the preferred one)
|
* @return string[] an array of extensions (first one is the preferred one)
|
||||||
*/
|
*/
|
||||||
public function getExtensions(string $mimeType): array;
|
public function getExtensions(string $mimeType): array;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the MIME types for the given extension.
|
* Gets the MIME types for the given extension.
|
||||||
*
|
*
|
||||||
* @return array an array of MIME types (first one is the preferred one)
|
* @return string[] an array of MIME types (first one is the preferred one)
|
||||||
*/
|
*/
|
||||||
public function getMimeTypes(string $ext): array;
|
public function getMimeTypes(string $ext): array;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user