src/Http/Resources/MetadataResource.php
Avoid unused parameters such as '$request'. Open
Open
public function toArray($request)
- Read upRead up
- Exclude checks
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
Open
class MetadataResource extends JsonResource
- Exclude checks
Call to undeclared method \EscolaLms\ModelFields\Models\Metadata::getKey
Open
Open
'id' => $this->resource->getKey(),
- Exclude checks