@@ -39,7 +39,7 @@ function cdnUrl($path = '')
39
39
{
40
40
$ cdn = (config ('settings.cdn ' )) ?: config ('app.url ' , '/ ' );
41
41
42
- return rtrim ($ cdn , '/ ' ) . '/ ' . ltrim ($ path , '/ ' );
42
+ return rtrim ($ cdn , '/ ' ). '/ ' . ltrim ($ path , '/ ' );
43
43
}
44
44
}
45
45
@@ -78,7 +78,7 @@ function mixCDN($file)
78
78
*/
79
79
function uploadUrl ($ url )
80
80
{
81
- return cdnUrl ('uploads/ ' . ltrim ($ url , '/ ' ));
81
+ return cdnUrl ('uploads/ ' . ltrim ($ url , '/ ' ));
82
82
}
83
83
}
84
84
@@ -91,7 +91,7 @@ function uploadUrl($url)
91
91
*/
92
92
function imgUrl ($ url )
93
93
{
94
- return cdnUrl ('img/ ' . ltrim ($ url , '/ ' ));
94
+ return cdnUrl ('img/ ' . ltrim ($ url , '/ ' ));
95
95
}
96
96
}
97
97
@@ -286,7 +286,7 @@ function getHost($url, $subdomain = true)
286
286
$ url = trim ($ url );
287
287
288
288
if (stripos ($ url , ':// ' ) === false && substr ($ url , 0 , 1 ) != '/ ' ) {
289
- $ url = 'http:// ' . $ url ;
289
+ $ url = 'http:// ' . $ url ;
290
290
}
291
291
292
292
$ parsedUrl = parse_url ($ url );
@@ -295,20 +295,20 @@ function getHost($url, $subdomain = true)
295
295
$ host = array_pop ($ parts );
296
296
297
297
if (strlen ($ tld ) === 2 && strlen ($ host ) <= 3 ) {
298
- $ tld = $ host . '. ' . $ tld ;
298
+ $ tld = $ host. '. ' . $ tld ;
299
299
$ host = array_pop ($ parts );
300
300
}
301
301
302
302
$ info = [
303
303
'protocol ' => $ parsedUrl ['scheme ' ],
304
304
'subdomain ' => implode ('. ' , $ parts ),
305
- 'domain ' => $ host . '. ' . $ tld ,
305
+ 'domain ' => $ host. '. ' . $ tld ,
306
306
'host ' => $ host ,
307
307
'tld ' => $ tld ,
308
308
];
309
309
310
310
return ($ subdomain && ! empty ($ info ['subdomain ' ]))
311
- ? $ info ['subdomain ' ] . '. ' . $ info ['domain ' ]
311
+ ? $ info ['subdomain ' ]. '. ' . $ info ['domain ' ]
312
312
: $ info ['domain ' ];
313
313
}
314
314
}
@@ -342,11 +342,11 @@ function randomFilename($path, $ext, $name = null, $timestamp = true)
342
342
$ filename = Str::lower ($ filename );
343
343
344
344
if ($ timestamp ) {
345
- $ filename .= '- ' . time ();
345
+ $ filename .= '- ' . time ();
346
346
}
347
347
348
348
// Loop until file does not exists
349
- while (file_exists ($ path . '/ ' . $ filename . '. ' . $ ext )) {
349
+ while (file_exists ($ path. '/ ' . $ filename. '. ' . $ ext )) {
350
350
$ filename .= rand (0 , 99999 );
351
351
}
352
352
@@ -578,7 +578,7 @@ function callBackground($command, $before = null, $after = null)
578
578
*/
579
579
function domainName ($ url , $ withSubdomain = false )
580
580
{
581
- $ url = 'http:// ' . str_replace (['http:// ' , 'https:// ' ], '' , $ url );
581
+ $ url = 'http:// ' . str_replace (['http:// ' , 'https:// ' ], '' , $ url );
582
582
$ host = parse_url ($ url , PHP_URL_HOST );
583
583
584
584
$ domain = new Domain ($ host );
@@ -646,9 +646,9 @@ function formatLicensePlate($plate)
646
646
'/^(\d{3})([A-Z]{2})(\d{1})$/ ' , // 14 999-XX-9 (since 2019)
647
647
648
648
// likely upcoming plate patterns
649
- //'^(\d{3})(\d{2})([A-Z]{1})$/', // 999-99-X
650
- //'^([A-Z]{3})(\d{2})(\d{1})$/', // XXX-99-9
651
- //'^([A-Z]{3})([A-Z]{2})(\d{1})$/', // XXX-XX-9
649
+ // '^(\d{3})(\d{2})([A-Z]{1})$/', // 999-99-X
650
+ // '^([A-Z]{3})(\d{2})(\d{1})$/', // XXX-99-9
651
+ // '^([A-Z]{3})([A-Z]{2})(\d{1})$/', // XXX-XX-9
652
652
];
653
653
654
654
$ diplomateLicencePlateRegex = '/^CD[ABFJNST]\d{1,3}$/ ' ;
@@ -716,10 +716,10 @@ function compressHtmlPDF($html)
716
716
717
717
// remove ws around block/undisplayed elements
718
718
$ html = preg_replace ('/ \\s+(< \\/?(?:area|article|aside|base(?:font)?|blockquote|body '
719
- . '|canvas|caption|center|col(?:group)?|dd|dir|div|dl|dt|fieldset|figcaption|figure|footer|form '
720
- . '|frame(?:set)?|h[1-6]|head|header|hgroup|hr|html|legend|li|link|main|map|menu|meta|nav '
721
- . '|ol|opt(?:group|ion)|output|p|param|section|t(?:able|body|head|d|h|r|foot|itle) '
722
- . '|ul|video) \\b[^>]*>)/iu ' , '$1 ' , $ html );
719
+ .'|canvas|caption|center|col(?:group)?|dd|dir|div|dl|dt|fieldset|figcaption|figure|footer|form '
720
+ .'|frame(?:set)?|h[1-6]|head|header|hgroup|hr|html|legend|li|link|main|map|menu|meta|nav '
721
+ .'|ol|opt(?:group|ion)|output|p|param|section|t(?:able|body|head|d|h|r|foot|itle) '
722
+ .'|ul|video) \\b[^>]*>)/iu ' , '$1 ' , $ html );
723
723
724
724
// remove ws outside of all elements
725
725
$ html = preg_replace (
0 commit comments