EscolaLMS/Consultations

View on GitHub
src/Dto/ConsultationUserTermResourceDto.php

Summary

Maintainability
A
1 hr
Test Coverage
A
100%

Method __construct has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function __construct(int $consultation_user_id, int $consultation_id, string $executed_at, string $status, string $duration, ?User $author, ?string $finished_at = null, ?Collection $users = null)
Severity: Major
Found in src/Dto/ConsultationUserTermResourceDto.php - About 1 hr to fix

    syntax error, unexpected 'int' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
    Open

        public int $consultation_user_id;

    The parameter $finished_at is not named in camelCase.
    Open

        public function __construct(int $consultation_user_id, int $consultation_id, string $executed_at, string $status, string $duration, ?User $author, ?string $finished_at = null, ?Collection $users = null)
        {
            $this->consultation_user_id = $consultation_user_id;
            $this->consultation_id = $consultation_id;
            $this->executed_at = $executed_at;

    CamelCaseParameterName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name parameters.

    Example

    class ClassName {
        public function doSomething($user_name) {
        }
    }

    Source

    The property $executed_at is not named in camelCase.
    Open

    class ConsultationUserTermResourceDto
    {
        public int $consultation_user_id;
        public int $consultation_id;
        public string $executed_at;

    CamelCasePropertyName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name attributes.

    Example

    class ClassName {
        protected $property_name;
    }

    Source

    The parameter $executed_at is not named in camelCase.
    Open

        public function __construct(int $consultation_user_id, int $consultation_id, string $executed_at, string $status, string $duration, ?User $author, ?string $finished_at = null, ?Collection $users = null)
        {
            $this->consultation_user_id = $consultation_user_id;
            $this->consultation_id = $consultation_id;
            $this->executed_at = $executed_at;

    CamelCaseParameterName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name parameters.

    Example

    class ClassName {
        public function doSomething($user_name) {
        }
    }

    Source

    The property $executed_status is not named in camelCase.
    Open

    class ConsultationUserTermResourceDto
    {
        public int $consultation_user_id;
        public int $consultation_id;
        public string $executed_at;

    CamelCasePropertyName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name attributes.

    Example

    class ClassName {
        protected $property_name;
    }

    Source

    The property $consultation_id is not named in camelCase.
    Open

    class ConsultationUserTermResourceDto
    {
        public int $consultation_user_id;
        public int $consultation_id;
        public string $executed_at;

    CamelCasePropertyName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name attributes.

    Example

    class ClassName {
        protected $property_name;
    }

    Source

    The property $consultation_user_id is not named in camelCase.
    Open

    class ConsultationUserTermResourceDto
    {
        public int $consultation_user_id;
        public int $consultation_id;
        public string $executed_at;

    CamelCasePropertyName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name attributes.

    Example

    class ClassName {
        protected $property_name;
    }

    Source

    The property $finished_at is not named in camelCase.
    Open

    class ConsultationUserTermResourceDto
    {
        public int $consultation_user_id;
        public int $consultation_id;
        public string $executed_at;

    CamelCasePropertyName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name attributes.

    Example

    class ClassName {
        protected $property_name;
    }

    Source

    The parameter $consultation_user_id is not named in camelCase.
    Open

        public function __construct(int $consultation_user_id, int $consultation_id, string $executed_at, string $status, string $duration, ?User $author, ?string $finished_at = null, ?Collection $users = null)
        {
            $this->consultation_user_id = $consultation_user_id;
            $this->consultation_id = $consultation_id;
            $this->executed_at = $executed_at;

    CamelCaseParameterName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name parameters.

    Example

    class ClassName {
        public function doSomething($user_name) {
        }
    }

    Source

    The parameter $consultation_id is not named in camelCase.
    Open

        public function __construct(int $consultation_user_id, int $consultation_id, string $executed_at, string $status, string $duration, ?User $author, ?string $finished_at = null, ?Collection $users = null)
        {
            $this->consultation_user_id = $consultation_user_id;
            $this->consultation_id = $consultation_id;
            $this->executed_at = $executed_at;

    CamelCaseParameterName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name parameters.

    Example

    class ClassName {
        public function doSomething($user_name) {
        }
    }

    Source

    The closing brace for the class must go on the next line after the body
    Open

    }

    Line exceeds 120 characters; contains 206 characters
    Open

        public function __construct(int $consultation_user_id, int $consultation_id, string $executed_at, string $status, string $duration, ?User $author, ?string $finished_at = null, ?Collection $users = null)

    The variable $executed_at is not named in camelCase.
    Open

        public function __construct(int $consultation_user_id, int $consultation_id, string $executed_at, string $status, string $duration, ?User $author, ?string $finished_at = null, ?Collection $users = null)
        {
            $this->consultation_user_id = $consultation_user_id;
            $this->consultation_id = $consultation_id;
            $this->executed_at = $executed_at;

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $consultation_id is not named in camelCase.
    Open

        public function __construct(int $consultation_user_id, int $consultation_id, string $executed_at, string $status, string $duration, ?User $author, ?string $finished_at = null, ?Collection $users = null)
        {
            $this->consultation_user_id = $consultation_user_id;
            $this->consultation_id = $consultation_id;
            $this->executed_at = $executed_at;

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $finished_at is not named in camelCase.
    Open

        public function __construct(int $consultation_user_id, int $consultation_id, string $executed_at, string $status, string $duration, ?User $author, ?string $finished_at = null, ?Collection $users = null)
        {
            $this->consultation_user_id = $consultation_user_id;
            $this->consultation_id = $consultation_id;
            $this->executed_at = $executed_at;

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $consultation_user_id is not named in camelCase.
    Open

        public function __construct(int $consultation_user_id, int $consultation_id, string $executed_at, string $status, string $duration, ?User $author, ?string $finished_at = null, ?Collection $users = null)
        {
            $this->consultation_user_id = $consultation_user_id;
            $this->consultation_id = $consultation_id;
            $this->executed_at = $executed_at;

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    There are no issues that match your filters.

    Category
    Status