Shift deprecated helpers

Laravel recommends using the `Str` and `Arr` class methods directly instead of the respective helper functions. These helper functions are [deprecated in Laravel 5.8][1] and will be removed in a future version.

[1]: https://github.com/laravel/framework/pull/26898
This commit is contained in:
Laravel Shift
2019-05-09 00:05:08 +00:00
parent d7bee79379
commit b0732954c4
42 changed files with 86 additions and 61 deletions
+2 -1
View File
@@ -13,6 +13,7 @@
namespace App\Http\Middleware;
use Illuminate\Support\Str;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
@@ -119,7 +120,7 @@ class Http2ServerPush
];
$type = collect($linkTypeMap)->first(function ($type, $extension) use ($url) {
return str_contains(strtoupper($url), $extension);
return Str::contains(strtoupper($url), $extension);
});
return is_null($type) ? null : "<{$url}>; rel=preload; as={$type}";