Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Pull Request — master (#118)
by Jérémiah
06:21
created

AbstractConnectionBuilderTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 4
dl 0
loc 27
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getExpectedConnection() 0 22 3
1
<?php
2
3
/*
4
 * This file is part of the OverblogGraphQLBundle package.
5
 *
6
 * (c) Overblog <http://github.com/overblog/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Overblog\GraphQLBundle\Tests\Relay\Connection\Output;
13
14
use Overblog\GraphQLBundle\Relay\Connection\Output\Connection;
15
use Overblog\GraphQLBundle\Relay\Connection\Output\Edge;
16
use Overblog\GraphQLBundle\Relay\Connection\Output\PageInfo;
17
18
abstract class AbstractConnectionBuilderTest extends \PHPUnit_Framework_TestCase
19
{
20
    protected $letters = ['A', 'B', 'C', 'D', 'E'];
21
22
    protected function getExpectedConnection(array $wantedEdges, $hasPreviousPage, $hasNextPage)
23
    {
24
        $edges = [
25
            'A' => new Edge('YXJyYXljb25uZWN0aW9uOjA=', 'A'),
26
            'B' => new Edge('YXJyYXljb25uZWN0aW9uOjE=', 'B'),
27
            'C' => new Edge('YXJyYXljb25uZWN0aW9uOjI=', 'C'),
28
            'D' => new Edge('YXJyYXljb25uZWN0aW9uOjM=', 'D'),
29
            'E' => new Edge('YXJyYXljb25uZWN0aW9uOjQ=', 'E'),
30
        ];
31
32
        $expectedEdges = array_values(array_intersect_key($edges, array_flip($wantedEdges)));
33
34
        return new Connection(
35
            $expectedEdges,
36
            new PageInfo(
37
                isset($expectedEdges[0]) ? $expectedEdges[0]->cursor : null,
38
                end($expectedEdges) ? end($expectedEdges)->cursor : null,
39
                $hasPreviousPage,
40
                $hasNextPage
41
            )
42
        );
43
    }
44
}
45