Issues (112)

UploadStrategy/OriginalNameStrategy.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace ByTIC\MediaLibrary\Collections\UploadStrategy;
4
5
/**
6
 * Class OriginalNameStrategy.
7
 */
8
class OriginalNameStrategy extends AbstractStrategy
9
{
10
    /**
11
     * @param $path
12
     * @param $extension
13
     *
14
     * @return string
15
     */
16 2
    public static function transformFileName($path, $extension)
17
    {
18 2
        $name = pathinfo($path, PATHINFO_FILENAME);
19
20 2
        return $name . '.' . $extension;
0 ignored issues
show
Are you sure $name of type array|string can be used in concatenation? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

20
        return /** @scrutinizer ignore-type */ $name . '.' . $extension;
Loading history...
21
    }
22
}
23