Completed
Push — master ( d80d23...dbf644 )
by David
18s queued 11s
created

ProductController::getProducts()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
4
namespace TheCodingMachine\GraphQL\Controllers\Fixtures\Integration\Controllers;
5
6
7
use Porpaginas\Arrays\ArrayResult;
8
use Psr\Http\Message\UploadedFileInterface;
9
use TheCodingMachine\GraphQL\Controllers\Annotations\Mutation;
10
use TheCodingMachine\GraphQL\Controllers\Annotations\Query;
11
use TheCodingMachine\GraphQL\Controllers\Fixtures\Integration\Models\Contact;
12
use TheCodingMachine\GraphQL\Controllers\Fixtures\Integration\Models\Product;
13
use TheCodingMachine\GraphQL\Controllers\Fixtures\Integration\Models\User;
14
15
class ProductController
16
{
17
    /**
18
     * @Query()
19
     * @return Product[]
20
     */
21
    public function getProducts(): ArrayResult
22
    {
23
        return new ArrayResult([
0 ignored issues
show
Bug Best Practice introduced by
The expression return new Porpaginas\Ar...\Product('Foo', 42.0))) returns the type Porpaginas\Arrays\ArrayResult which is incompatible with the documented return type TheCodingMachine\GraphQL...ration\Models\Product[].
Loading history...
24
            new Product('Foo', 42.0),
25
        ]);
26
    }
27
}
28