EscolaLMS/model-fields

View on GitHub
src/Http/Resources/MetadataResource.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Avoid unused parameters such as '$request'.
Open

    public function toArray($request)

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Class extends undeclared class \Illuminate\Http\Resources\Json\JsonResource
Open

class MetadataResource extends JsonResource
Severity: Critical
Found in src/Http/Resources/MetadataResource.php by phan

Call to undeclared method \EscolaLms\ModelFields\Models\Metadata::getKey
Open

            'id' => $this->resource->getKey(),
Severity: Critical
Found in src/Http/Resources/MetadataResource.php by phan

There are no issues that match your filters.

Category
Status