Fix files with Laravel Pint

This commit is contained in:
Jonny Barnes 2022-07-09 10:08:26 +01:00
parent c714457604
commit e36f15d391
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
116 changed files with 409 additions and 378 deletions

View file

@ -68,7 +68,7 @@ if (! function_exists('normalize_url')) {
$url['path'] = preg_replace_callback(
array_map(
function ($str) {
return "/%" . strtoupper($str) . "/x";
return '/%' . strtoupper($str) . '/x';
},
$u
),
@ -78,10 +78,10 @@ if (! function_exists('normalize_url')) {
$url['path']
);
// Remove directory index
$defaultIndexes = ["/default\.aspx/" => 'default.aspx/', "/default\.asp/" => 'default.asp/',
"/index\.html/" => 'index.html/', "/index\.htm/" => 'index.htm/',
"/default\.html/" => 'default.html/', "/default\.htm/" => 'default.htm/',
"/index\.php/" => 'index.php/', "/index\.jsp/" => 'index.jsp/', ];
$defaultIndexes = ["/default\.aspx/" => 'default.aspx/', "/default\.asp/" => 'default.asp/',
"/index\.html/" => 'index.html/', "/index\.htm/" => 'index.htm/',
"/default\.html/" => 'default.html/', "/default\.htm/" => 'default.htm/',
"/index\.php/" => 'index.php/', "/index\.jsp/" => 'index.jsp/', ];
foreach ($defaultIndexes as $index => $strip) {
if (preg_match($index, $url['path'])) {
$url['path'] = str_replace($strip, '', $url['path']);