Showing 1,241 of 1,241 total issues
Method generateJitsiUrlForEmail
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function generateJitsiUrlForEmail(int $consultationTermId, int $userId, string $executedAt): ?string
{
/** @var ConsultationUserPivot $consultationTerm */
$consultationTerm = $this->consultationUserRepositoryContract->find($consultationTermId);
/** @var ConsultationUserTerm $term */
Method prepareFilters
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function prepareFilters(array $search)
{
$dto = new self($search);
$user = auth()->user();
Method toArray
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function toArray($request)
{
$consultationServiceContract = app(ConsultationServiceContract::class);
$consultation = $this->resource->consultationUser->consultation;
Method run
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run()
{
// create permissions
$admin = Role::findOrCreate(UserRole::ADMIN, 'api');
$tutor = Role::findOrCreate(UserRole::TUTOR, 'api');
Function prepareFilters
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function prepareFilters(array $search)
{
$dto = new self($search);
$user = auth()->user();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method toArray
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function toArray($request)
{
$consultationServiceContract = app(ConsultationServiceContract::class);
$fields = [
'consultation_term_id' => $this->resource->consultation_user_id,
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,
Method reminderAboutConsultation
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function reminderAboutConsultation(string $reminderStatus): void
{
/** @var ConsultationUserTerm $userTerm */
foreach ($this->getReminderData($reminderStatus) as $userTerm) {
event(new ReminderAboutTerm(
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
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)
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class AddTableRelationsUsersConsultations extends Migration
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class AddNewPermissionMigrate extends Migration
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class AddMissingsColumnToConsultationsTable extends Migration
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class RemoveUniqueIndexInConsultaionUserTable extends Migration
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class CreateConsultationProposedTermsTale extends Migration
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class AddPivotTableForOrderItemsAndUser extends Migration
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class ChangeNameColumnsForConsultationsTable extends Migration
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class AddSenderStatusInConsultationUserTable extends Migration
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class AddProductColumnInConsultationUserTable extends Migration
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class AddColumnImagePathForConsultationsTable extends Migration
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class AddShortDescInConsultationsTable extends Migration
- Exclude checks