src/Http/Resources/ConsultationUserResource.php
Method toArray
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function toArray($request)
{
return [
'id' => $this->resource->id,
'first_name' => $this->resource->firstName,
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
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'deleted_at' => $this->resource->deletedAt,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'path_avatar' => $this->resource->pathAvatar,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'postcode' => $this->resource->postcode,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'current_timezone' => $this->resource->currentTimezone,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'age' => $this->resource->age,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'first_name' => $this->resource->firstName,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'country' => $this->resource->country,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'notification_channels' => $this->resource->notificationChannels,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'avatar_url' => $this->resource->avatarUrl,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'city' => $this->resource->city,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'id' => $this->resource->id,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'points' => $this->resource->points,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'executed_status' => $this->resource->executedStatus,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'street' => $this->resource->street,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'updated_at' => $this->resource->updatedAt,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'last_name' => $this->resource->lastName,
- Exclude checks
Class extends undeclared class \Illuminate\Http\Resources\Json\JsonResource
Open
Open
class ConsultationUserResource extends JsonResource
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'email' => $this->resource->email,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'created_at' => $this->resource->createdAt,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'phone' => $this->resource->phone,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'email_verified_at' => $this->resource->emailVerifiedAt,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'gender' => $this->resource->gender,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'delete_user_token' => $this->resource->deleteUserToken,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'is_active' => $this->resource->isActive,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'access_to_directories' => $this->resource->accessToDirectories,
- Exclude checks
Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
Open
Open
'categories' => $this->resource->categories,
- Exclude checks