Passed
Push — main ( ec0923...4d334c )
by Seth
01:22
created

FileManager::preview()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace SaasReady\Services\FileManager;
4
5
use Illuminate\Filesystem\FilesystemManager;
0 ignored issues
show
Bug introduced by
The type Illuminate\Filesystem\FilesystemManager was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use SaasReady\Models\File;
7
8
class FileManager
9
{
10
    public function __construct(private FilesystemManager $filesystemManager)
11
    {
12
    }
13
14
    /**
15
     * Upload the file
16
     *
17
     * @codeCoverageIgnore
18
     */
19
    public function upload(UploadOption $uploadOption): ?File
0 ignored issues
show
Unused Code introduced by
The parameter $uploadOption is not used and could be removed. ( Ignorable by Annotation )

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

19
    public function upload(/** @scrutinizer ignore-unused */ UploadOption $uploadOption): ?File

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
20
    {
21
        // TODO: implements
22
        return null;
23
    }
24
25
    /**
26
     * Get the URL of the File
27
     *
28
     * @codeCoverageIgnore
29
     */
30
    public function preview(File $file): ?string
0 ignored issues
show
Unused Code introduced by
The parameter $file is not used and could be removed. ( Ignorable by Annotation )

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

30
    public function preview(/** @scrutinizer ignore-unused */ File $file): ?string

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
31
    {
32
        return null;
33
    }
34
}
35