GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( e7bef7...3cccd4 )
by Šimon
03:07
created

Echoer::resolve()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
interface Resolver {
4
    public function resolve($rootValue, $args, $context);
5
}
6
7
class Addition implements Resolver
8
{
9
    public function resolve($rootValue, $args, $context)
10
    {
11
        return $args['x'] + $args['y'];
12
    }
13
}
14
15
class Echoer implements Resolver
16
{
17
    public function resolve($rootValue, $args, $context)
18
    {
19
        return $rootValue['prefix'].$args['message'];
20
    }
21
}
22
23
return [
24
    'sum' => function($rootValue, $args, $context) {
25
        $sum = new Addition();
26
27
        return $sum->resolve($rootValue, $args, $context);
28
    },
29
    'echo' => function($rootValue, $args, $context) {
30
        $echo = new Echoer();
31
32
        return $echo->resolve($rootValue, $args, $context);
33
    },
34
    'prefix' => 'You said: ',
35
];
36