Completed
Push — master ( d90a90...c5007d )
by Freek
13:09 queued 12:03
created

src/Helpers/TemporaryDirectory.php (1 issue)

Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Spatie\MediaLibrary\Helpers;
4
5
use Spatie\TemporaryDirectory\TemporaryDirectory as BaseTemporaryDirectory;
6
7
class TemporaryDirectory
8
{
9
    public static function create(): BaseTemporaryDirectory
10
    {
11
        return new BaseTemporaryDirectory(static::getTemporaryDirectoryPath());
12
    }
13
14
    protected static function getTemporaryDirectoryPath(): string
15
    {
16
        $path = config('medialibrary.temporary_directory_path') ?? storage_path('medialibrary/temp');
17
18
        return $path.DIRECTORY_SEPARATOR.str_random(32);
0 ignored issues
show
Deprecated Code introduced by
The function str_random() has been deprecated with message: Str::random() should be used directly instead. Will be removed in Laravel 5.9.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
19
    }
20
}
21