Passed
Pull Request — master (#9)
by Quang
02:11
created

ArrayConnection   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A connectionFromArraySlice() 0 4 1
1
<?php
2
3
namespace Digia\Lumen\GraphQL;
4
5
use Youshido\GraphQL\Relay\Connection\ArrayConnection as BaseArrayConnection;
6
7
class ArrayConnection extends BaseArrayConnection
8
{
9
10
    /** @noinspection MoreThanThreeArgumentsInspection */
11
12
    /**
13
     * @param array $data
14
     * @param array $args
15
     * @param int   $sliceStart
16
     * @param int   $arrayLength
17
     *
18
     * @return array
19
     */
20
    public static function connectionFromArraySlice(array $data, array $args, $sliceStart, $arrayLength)
21
    {
22
        return array_merge(parent::connectionFromArraySlice($data, $args, $sliceStart, $arrayLength), [
23
            'total' => $arrayLength,
24
        ]);
25
    }
26
}
27