GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#202)
by Konstantin
09:30
created

UploadedFileProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 16
ccs 0
cts 7
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A uploadedFile() 0 13 2
1
<?php
2
3
namespace Hautelook\AliceBundle\Faker\Provider;
4
5
use Symfony\Component\HttpFoundation\File\UploadedFile;
6
7
class UploadedFileProvider
8
{
9
    public static function uploadedFile($filePath, $originalName = null)
10
    {
11
        $tmpFilePath = tempnam(sys_get_temp_dir(), 'alice-');
12
        copy($filePath, $tmpFilePath);
13
14
        if (null === $originalName) {
15
            $originalName = basename($filePath);
16
        }
17
18
        //TODO: register shutdown function for removing
19
20
        return new UploadedFile($tmpFilePath, $originalName, null, null, null, true);
21
    }
22
}
23