Showing 1,241 of 1,241 total issues
Parameter $query
has undeclared type \Illuminate\Database\Eloquent\Builder
Open
public function apply(Builder $query): Builder
- Exclude checks
Return type of apply()
is undeclared type \Illuminate\Database\Eloquent\Builder
Open
public function apply(Builder $query): Builder
- Exclude checks
Return type of getConsultationsList()
is undeclared type \Illuminate\Database\Eloquent\Builder
Open
public function getConsultationsList(array $search = [], bool $onlyActive = false, OrderDto $orderDto = null): Builder;
- Exclude checks
syntax error, unexpected 'Consultation' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
Open
private Consultation $consultation;
- Exclude checks
Reference to constant class
from undeclared class \EscolaLms\Consultations\Http\Controllers\ConsultationController
Open
Route::post('consultations/{id}', [ConsultationController::class, 'update']);
- Exclude checks
Call to method get
from undeclared class \Illuminate\Support\Facades\Route
Open
Route::get('/my-schedule', [ConsultationAPIController::class, 'schedule']);
- Exclude checks
syntax error, unexpected ')'
Open
)
- Exclude checks
Class extends undeclared class \EscolaLms\Core\Repositories\Criteria\Criterion
Open
class OrderCriterion extends Criterion
- Exclude checks
Call to method whereHas
from undeclared class \Illuminate\Database\Eloquent\Builder
Open
return $query->whereHas('user');
- Exclude checks
Reference to constant class
from undeclared class \EscolaLms\Consultations\Http\Controllers\ConsultationController
Open
Route::post('consultations/change-term/{consultationTermId}', [ConsultationController::class, 'changeTerm']);
- Exclude checks
Reference to constant class
from undeclared class \EscolaLms\Consultations\Http\Controllers\ConsultationAPIController
Open
Route::get('/me', [ConsultationAPIController::class, 'forCurrentUser']);
- Exclude checks
Call to method post
from undeclared class \Illuminate\Support\Facades\Route
Open
Route::post('/change-term/{consultationTermId}', [ConsultationController::class, 'changeTerm']);
- Exclude checks
Reference to constant class
from undeclared class \EscolaLms\Consultations\Http\Controllers\ConsultationAPIController
Open
Route::post('/finish-term/{consultationTermId}', [ConsultationAPIController::class, 'finishTerm']);
- Exclude checks
Reference to constant class
from undeclared class \EscolaLms\Consultations\Http\Controllers\ConsultationAPIController
Open
Route::post('api/consultations/save-screen', [ConsultationAPIController::class, 'screenSave']);
- Exclude checks
Define a constant instead of duplicating this literal "required" 6 times. Open
'consultation_id' => ['required', 'exists:consultations,id'],
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "orders" 7 times. Open
Schema::hasTable('orders') &&
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "image_path" 3 times. Open
'image_path',
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "executed_status" 3 times. Open
$table->string('executed_status')->nullable();
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "orders" 6 times. Open
Schema::hasTable('orders') &&
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "executed_at" 5 times. Open
Schema::hasColumns('orders', ['executed_at', 'executed_status'])
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.