EscolaLMS/Consultations

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

Summary

Maintainability
A
1 hr
Test Coverage
A
100%

Method toArray has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function toArray($request)
    {
        return [
            'id' => $this->resource->id,
            'first_name' => $this->resource->firstName,
Severity: Minor
Found in src/Http/Resources/ConsultationUserResource.php - About 1 hr to fix

    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

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'deleted_at' => $this->resource->deletedAt,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'path_avatar' => $this->resource->pathAvatar,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'postcode' => $this->resource->postcode,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'current_timezone' => $this->resource->currentTimezone,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'age' => $this->resource->age,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'first_name' => $this->resource->firstName,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'country' => $this->resource->country,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'notification_channels' => $this->resource->notificationChannels,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'avatar_url' => $this->resource->avatarUrl,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'city' => $this->resource->city,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'id' => $this->resource->id,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'points' => $this->resource->points,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'executed_status' => $this->resource->executedStatus,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'street' => $this->resource->street,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'updated_at' => $this->resource->updatedAt,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'last_name' => $this->resource->lastName,

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

    class ConsultationUserResource extends JsonResource

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'email' => $this->resource->email,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'created_at' => $this->resource->createdAt,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'phone' => $this->resource->phone,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'email_verified_at' => $this->resource->emailVerifiedAt,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'gender' => $this->resource->gender,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'delete_user_token' => $this->resource->deleteUserToken,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'is_active' => $this->resource->isActive,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'access_to_directories' => $this->resource->accessToDirectories,

    Reference to undeclared property \EscolaLms\Consultations\Http\Resources\ConsultationUserResource->resource
    Open

                'categories' => $this->resource->categories,

    There are no issues that match your filters.

    Category
    Status