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:
Fabien Potencier 2019-01-29 22:32:03 +01:00
commit d18aa4d11b
3 changed files with 7 additions and 3 deletions

View File

@ -28,7 +28,7 @@ interface MimeTypeGuesserInterface
*
* @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 \InvalidArgumentException If the file does not exist or is not readable

View File

@ -35,6 +35,10 @@ namespace Symfony\Component\Mime;
final class MimeTypes implements MimeTypesInterface
{
private $extensions = [];
/**
* @var MimeTypeGuesserInterface[]
*/
private $guessers = [];
private static $default;

View File

@ -19,14 +19,14 @@ interface MimeTypesInterface extends MimeTypeGuesserInterface
/**
* 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;
/**
* 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;
}