Skip to content

Commit 644aa0e

Browse files
committed
minor #15399 Update mime.rst (JakeFr)
This PR was merged into the 4.4 branch. Discussion ---------- Update mime.rst Hello, Update code sample for MimeTypes : current reassign variable so code fails to run if you copy paste it fully. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `5.x` for features of unreleased versions). --> Commits ------- 9f00cd8 Update mime.rst
2 parents 57aaeb3 + 9f00cd8 commit 644aa0e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/mime.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,10 @@ MIME types and file name extensions::
242242
$exts = $mimeTypes->getExtensions('image/jpeg');
243243
// $exts = ['jpeg', 'jpg', 'jpe']
244244

245-
$mimeTypes = $mimeTypes->getMimeTypes('js');
246-
// $mimeTypes = ['application/javascript', 'application/x-javascript', 'text/javascript']
247-
$mimeTypes = $mimeTypes->getMimeTypes('apk');
248-
// $mimeTypes = ['application/vnd.android.package-archive']
245+
$types = $mimeTypes->getMimeTypes('js');
246+
// $types = ['application/javascript', 'application/x-javascript', 'text/javascript']
247+
$types = $mimeTypes->getMimeTypes('apk');
248+
// $types = ['application/vnd.android.package-archive']
249249

250250
These methods return arrays with one or more elements. The element position
251251
indicates its priority, so the first returned extension is the preferred one.

0 commit comments

Comments
 (0)