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

ProductController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 10
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getProducts() 0 4 1
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