Completed
Push — master ( bce26f...f3ed76 )
by Andreas
17s
created

ODM/MongoDB/Repository/GridFSRepository.php (1 issue)

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
declare(strict_types=1);
4
5
namespace Doctrine\ODM\MongoDB\Repository;
6
7
use Doctrine\Common\Persistence\ObjectRepository;
8
9
interface GridFSRepository extends ObjectRepository
10
{
11
    /**
12
     * Opens a readable stream for reading a GridFS file.
13
     *
14
     * @param mixed $id File ID
15
     * @return resource
16
     */
17
    public function openDownloadStream($id);
18
19
    /**
20
     * Writes the contents of a GridFS file to a writable stream.
21
     *
22
     * @param mixed    $id          File ID
23
     * @param resource $destination Writable Stream
24
     */
25
    public function downloadToStream($id, $destination): void;
26
27
    /**
28
     * Opens a writable stream for writing a GridFS file.
29
     *
30
     * @return resource
31
     */
32
    public function openUploadStream(string $filename, ?UploadOptions $uploadOptions = null);
33
34
    /**
35
     * Writes the contents of a readable stream to a GridFS file.
36
     *
37
     * @param resource    $source   Readable stream
38
     * @param object|null $metadata
0 ignored issues
show
There is no parameter named $metadata. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
39
     * @return object The newly created GridFS file
40
     */
41
    public function uploadFromStream(string $filename, $source, ?UploadOptions $uploadOptions = null);
42
43
    /**
44
     * Writes the contents of a file to a GridFS file.
45
     *
46
     * @param string      $path
47
     * @param string|null $filename The filename to upload the file with. If no filename is provided, the name of the source file will be used.
48
     * @param object|null $metadata
49
     * @return object The newly created GridFS file
50
     */
51
    public function uploadFromFile(string $source, ?string $filename = null, ?UploadOptions $uploadOptions = null);
52
}
53