Completed
Push — master ( 1bceff...ab9d36 )
by Robbie
03:14 queued 01:48
created

tests/Stub/StubRelatedDocumentExtension.php (2 issues)

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
 * Class StubRelatedDocumentExtension
5
 *
6
 * @package dms
7
 */
8
class StubRelatedDocumentExtension extends DataExtension implements TestOnly
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
9
{
10
    /**
11
     * For method {@link DMSDocument::getRelatedDocuments}
12
     *
13
     * @param  ArrayList $relatedDocuments
14
     * @return ArrayList
15
     */
16
    public function updateRelatedDocuments($relatedDocuments)
17
    {
18
        $relatedDocuments->push($this->getFakeDocument());
19
        return $relatedDocuments;
20
    }
21
22
    /**
23
     * For method {@link DMSDocumentSet::getDocuments}
24
     *
25
     * @param  ArrayList $relatedDocuments
0 ignored issues
show
There is no parameter named $relatedDocuments. Did you maybe mean $documents?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.

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

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

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

Loading history...
26
     * @return ArrayList
27
     */
28
    public function updateDocuments($documents)
29
    {
30
        $documents->push($this->getFakeDocument());
31
        return $documents;
32
    }
33
34
    /**
35
     * Return a dummy document for testing purposes
36
     *
37
     * @return DMSDocument
38
     */
39
    protected function getFakeDocument()
40
    {
41
        $fakeDocument = new DMSDocument;
42
        $fakeDocument->Filename = 'Extended';
43
        return $fakeDocument;
44
    }
45
}
46