Skip to content

Commit

Permalink
cs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikzogg committed Mar 6, 2022
1 parent 6b221ec commit bfe96de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions generate-mimetypes.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

$apacheMimeTypes = file_get_contents('https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types');

$mimetypes = [];
Expand All @@ -11,7 +13,7 @@

$matches = [];
if (1 !== preg_match('/^([^\t]+)\t+(.*)$/', $line, $matches)) {
throw new \Exception("Cannot parse line ${line}");
throw new \Exception("Cannot parse line {$line}");
}

foreach (preg_split('/\s+/', $matches[2]) as $key) {
Expand All @@ -29,4 +31,4 @@

ksort($mimetypes);

file_put_contents(__DIR__.'/src/mimetypes.php', '<?php return ' . var_export($mimetypes, true) . ';');
file_put_contents(__DIR__.'/src/mimetypes.php', '<?php return '.var_export($mimetypes, true).';');

0 comments on commit bfe96de

Please sign in to comment.