paginationInformation()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace mav3rick177\RapidPagination\Http\Resources\Json;
4
5
use Illuminate\Http\Resources\Json\PaginatedResourceResponse;
6
use Illuminate\Support\Arr;
7
8
/**
9
 * class PaginationResultResourceResponse
10
 */
11
class PaginationResultResourceResponse extends PaginatedResourceResponse
12
{
13
    /**
14
     * Add the pagination information to the response.
15
     *
16
     * @param  \Illuminate\Http\Request $request
17
     * @return array
18
     */
19
    protected function paginationInformation($request)
20
    {
21
        return Arr::except($this->resource->resource->toArray(), 'records');
22
    }
23
}
24