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 (#28)
by Jérémiah
13:39
created

EdgeBuilder::createCollection()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 10
ccs 6
cts 6
cp 1
rs 9.4285
cc 2
eloc 5
nc 2
nop 2
crap 2
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\Relay\Connection\Output;
13
14
class EdgeBuilder
15
{
16
    /**
17
     * @param int   $offset
18
     * @param mixed $node
19
     *
20
     * @return Edge
21
     */
22 27
    public static function create($offset, $node)
23
    {
24 27
        return new Edge(ConnectionBuilder::offsetToCursor($offset), $node);
25
    }
26
27
    /**
28
     * @param array $slice
29
     * @param int   $startOffset
30
     *
31
     * @return Edge[]
32
     */
33 29
    public static function createCollection($slice, $startOffset = 0)
34
    {
35 29
        $edges = [];
36
37 29
        foreach ($slice as $index => $value) {
38 27
            $edges[] = static::create($startOffset + $index, $value);
39 29
        }
40
41 29
        return $edges;
42
    }
43
}
44