Completed
Push — master ( f8702a...461e07 )
by Alexandr
04:08
created

DataProvider::getPost()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 1
eloc 7
nc 1
nop 1
1
<?php
2
/**
3
 * DataProvider.php
4
 */
5
6
namespace Examples\Blog\Schema;
7
8
class DataProvider
9
{
10
    public static function getPost($id)
11
    {
12
        return [
13
            "id"        => "post-" . $id,
14
            "title"     => "Post " . $id . " title",
15
            "summary"   => "This new GraphQL library for PHP works really well",
16
            "status"    => 1,
17
            "likeCount" => 2
18
        ];
19
    }
20
21
    public static function getBanner($id)
22
    {
23
        return [
24
            'id'        => "banner-" . $id,
25
            'title'     => "Banner " . $id,
26
            'imageLink' => "banner" . $id . ".jpg"
27
        ];
28
    }
29
}
30