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
Push — master ( 2d6991...ab3243 )
by Stan
02:44
created

File::initInputFile()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 11
rs 9.4285
cc 2
eloc 6
nc 2
nop 1
1
<?php
2
3
/**
4
 * Trait with methods to handle file uploads via CURL.
5
 *
6
 * @package Teebot (Telegram bot framework)
7
 *
8
 * @author  Stanislav Drozdov <[email protected]>
9
 */
10
11
namespace Teebot\Traits;
12
13
use Teebot\Entity\InputFile;
14
use \CURLFile;
15
16
trait File
17
{
18
    protected $hasAttachedData = false;
19
20
    /**
21
     * Creates an InputFile instance for handling file uploads.
22
     *
23
     * @param string $file Full path to the file
24
     *
25
     * @return \CURLFile
26
     */
27
    protected function initInputFile($file)
28
    {
29
        $inputFile = new InputFile($file);
30
        $file      = $inputFile->getFileForUpload();
31
32
        if ($file instanceof CURLFile) {
0 ignored issues
show
Bug introduced by
The class CURLFile does not exist. Is this class maybe located in a folder that is not analyzed, or in a newer version of your dependencies than listed in your composer.lock/composer.json?
Loading history...
33
            $this->hasAttachedData = ($file instanceof CURLFile);
0 ignored issues
show
Bug introduced by
The class CURLFile does not exist. Is this class maybe located in a folder that is not analyzed, or in a newer version of your dependencies than listed in your composer.lock/composer.json?
Loading history...
34
        }
35
36
        return $file;
37
    }
38
}
39