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

src/Traits/File.php (2 issues)

Labels
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
/**
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
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
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