EscolaLMS/Consultations

View on GitHub

Showing 1,241 of 1,241 total issues

Avoid using short method names like ChangeColumnsInConsultationuserTable::up(). The configured minimum method name length is 3.
Open

    public function up()
    {
        Schema::table('consultation_user', function (Blueprint $table) {
            $table->dateTime('executed_at')->nullable();
            $table->string('executed_status')->nullable();

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like RemoveUniqueIndexInConsultaionUserTable::up(). The configured minimum method name length is 3.
Open

    public function up()
    {
        if (DB::connection() instanceof MySqlConnection) {
            DB::statement('ALTER TABLE `consultation_user` DROP INDEX `consultation_user_unique`, ADD INDEX (user_id, consultation_id)');
        } else {

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like CreateConsultationsTable::up(). The configured minimum method name length is 3.
Open

    public function up(): void
    {
        Schema::create('consultations', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('author_id')->unsigned()->nullable();

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like RemoveRedundantColumnsFromConsultationsTable::up(). The configured minimum method name length is 3.
Open

    public function up(): void
    {
        Schema::table('consultations', function (Blueprint $table) {
            $table->dropColumn('duration');
        });

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like AddConsultationIdColumnForConsultationTermsTable::up(). The configured minimum method name length is 3.
Open

    public function up()
    {
        Schema::table('consultation_terms', function (Blueprint $table) {
            $table->bigInteger('consultation_id')->unsigned()->nullable();
            $table->foreign('consultation_id')->on('consultations')->references('id')->nullOnDelete();

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like AddProductColumnInConsultationUserTable::up(). The configured minimum method name length is 3.
Open

    public function up()
    {
        Schema::table('consultation_user', function (Blueprint $table) {
            $table->bigInteger('product_id')->unsigned()->nullable();
            if (Schema::hasTable('products')) {

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like AddColumnImagePathForConsultationsTable::up(). The configured minimum method name length is 3.
Open

    public function up()
    {
        Schema::table('consultations', function (Blueprint $table) {
            $table->string('image_path')->nullable();
        });

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like ChangeNameColumnsForConsultationsTable::up(). The configured minimum method name length is 3.
Open

    public function up(): void
    {
        Schema::table('consultations', function (Blueprint $table) {
            $table->renameColumn('started_at', 'active_from');
            $table->renameColumn('finished_at', 'active_to');

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like CreateConsultationsParticipantsTable::up(). The configured minimum method name length is 3.
Open

    public function up(): void
    {
        Schema::create('consultations_participants', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('consultation_id')->unsigned()->index();

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like RemoveMissingColumns::up(). The configured minimum method name length is 3.
Open

    public function up(): void
    {
        Schema::table('consultations', function (Blueprint $table) {
            $table->dropColumn('calendar_url');
        });

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like CreateLogotypeColumnInConsultationsTable::up(). The configured minimum method name length is 3.
Open

    public function up()
    {
        Schema::table('consultations', function (Blueprint $table) {
            $table->string('logotype_path')->nullable();
        });

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like AddMissingsColumnToConsultationsTable::up(). The configured minimum method name length is 3.
Open

    public function up(): void
    {
        Schema::table('consultations', function (Blueprint $table) {
            $table->string('duration')->nullable();
        });

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like CreateConsultationProposedTermsTale::up(). The configured minimum method name length is 3.
Open

    public function up()
    {
        Schema::create('consultation_proposed_terms', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('consultation_id')->unsigned();

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like CreateConsultationCategoryTable::up(). The configured minimum method name length is 3.
Open

    public function up()
    {
        Schema::create('category_consultation', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('consultation_id');

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like AddNewPermissionMigrate::up(). The configured minimum method name length is 3.
Open

    public function up()
    {
        Permission::findOrCreate(ConsultationsPermissionsEnum::CONSULTATION_CHANGE_TERM, 'api');
    }

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like AddMaxParticipantsOnSessionToConsultationsTable::up(). The configured minimum method name length is 3.
Open

    public function up(): void
    {
        Schema::table('consultations', function (Blueprint $table) {
            $table->unsignedInteger('max_session_students')->default(1);
        });

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like AddPivotTableForOrderItemsAndUser::up(). The configured minimum method name length is 3.
Open

    public function up(): void
    {
        if (
            Schema::hasTable('orders') &&
            Schema::hasColumns('orders', ['executed_at', 'executed_status'])

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Avoid using short method names like RemoveNotUsedColumnsFromConsultationsTable::up(). The configured minimum method name length is 3.
Open

    public function up()
    {
        Schema::table('consultations', function (Blueprint $table) {
            $table->dropColumn('base_price');
        });

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

Method forCurrentUserResponse has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function forCurrentUserResponse(
        ListConsultationsRequest $listConsultationsRequest
    ): AnonymousResourceCollection {
        $search = $listConsultationsRequest->except(['limit', 'skip', 'order', 'order_by', 'paginate']);
        $consultations = $this->getConsultationsListForCurrentUser($search);
Severity: Minor
Found in src/Services/ConsultationService.php - About 1 hr to fix

    Method getByCurrentUserTutor has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getByCurrentUserTutor(): Collection
        {
            $result = collect();
            $terms = $this->model->newQuery()
                ->whereHas('consultationUser', fn (Builder $query) => $query
    Severity: Minor
    Found in src/Repositories/ConsultationUserTermRepository.php - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language