Completed
Pull Request — master (#47)
by David
01:40
created

ContactController::getContacts()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
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 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