These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\MediaBundle\Helper\File; |
||
4 | |||
5 | use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesserInterface; |
||
6 | |||
7 | @trigger_error(sprintf('The "%s" class is deprecated since KunstmaanMediaBundle 5.7 and will be removed in KunstmaanMediaBundle 6.0. Use the "symfony/mime" component instead.', __CLASS__), E_USER_DEPRECATED); |
||
0 ignored issues
–
show
|
|||
8 | |||
9 | /** |
||
10 | * @deprecated This class is deprecated since KunstmaanMediaBundle 5.7 and will be removed in KunstmaanMediaBundle 6.0. Use the "symfony/mime" component instead. |
||
11 | */ |
||
12 | class SVGExtensionGuesser implements ExtensionGuesserInterface |
||
13 | { |
||
14 | /** |
||
15 | * {@inheritdoc} |
||
16 | */ |
||
17 | public function guess($mimeType) |
||
18 | { |
||
19 | if ($mimeType === 'image/svg+xml') { |
||
20 | return 'svg'; |
||
21 | } |
||
22 | |||
23 | return null; |
||
24 | } |
||
25 | } |
||
26 |
If you suppress an error, we recommend checking for the error condition explicitly: