ChunkResource   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 2
dl 0
loc 12
rs 10
c 2
b 1
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 3 1
1
<?php
2
3
namespace Jobtech\LaravelChunky\Http\Resources;
4
5
use Illuminate\Http\Resources\Json\JsonResource;
0 ignored issues
show
Bug introduced by
The type Illuminate\Http\Resources\Json\JsonResource was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
class ChunkResource extends JsonResource
8
{
9
    /**
10
     * Transform the resource into an array.
11
     *
12
     * @param \Illuminate\Http\Request $request
0 ignored issues
show
Bug introduced by
The type Illuminate\Http\Request was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
     *
14
     * @return array
15
     */
16
    public function toArray($request)
17
    {
18
        return $this->resource->toArray();
19
    }
20
}
21