Completed
Pull Request — master (#47)
by David
03:13
created

ContactController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getContacts() 0 5 1
1
<?php
2
3
4
namespace TheCodingMachine\GraphQL\Controllers\Fixtures\Integration\Controllers;
5
6
7
use TheCodingMachine\GraphQL\Controllers\Annotations\Query;
8
use TheCodingMachine\GraphQL\Controllers\Fixtures\Integration\Models\Contact;
9
use TheCodingMachine\GraphQL\Controllers\Fixtures\Integration\Models\User;
10
11
class ContactController
12
{
13
    /**
14
     * @Query()
15
     * @return Contact[]
16
     */
17
    public function getContacts(): array
18
    {
19
        return [
20
            new Contact('Joe'),
21
            new User('Bill', '[email protected]'),
22
        ];
23
    }
24
}
25