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

DataProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getPost() 0 10 1
A getBanner() 0 8 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