Showing 27 of 27 total issues
Similar blocks of code found in 5 locations. Consider refactoring. Open
<?php declare(strict_types=1); use Illuminate\Support\Facades\Schema;
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 5 locations. Consider refactoring. Open
<?php declare(strict_types=1); use Illuminate\Support\Facades\Schema;
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 5 locations. Consider refactoring. Open
<?php declare(strict_types=1); use Illuminate\Support\Facades\Schema;
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 5 locations. Consider refactoring. Open
<?php declare(strict_types=1); use Illuminate\Support\Facades\Schema;
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 5 locations. Consider refactoring. Open
<?php declare(strict_types=1); use Illuminate\Support\Facades\Schema;
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 5 locations. Consider refactoring. Open
<?php declare(strict_types=1); namespace Rinvex\Attributes\Models\Type;
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 5 locations. Consider refactoring. Open
<?php declare(strict_types=1); namespace Rinvex\Attributes\Models\Type;
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 5 locations. Consider refactoring. Open
<?php declare(strict_types=1); namespace Rinvex\Attributes\Models\Type;
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 5 locations. Consider refactoring. Open
<?php declare(strict_types=1); namespace Rinvex\Attributes\Models\Type;
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 5 locations. Consider refactoring. Open
<?php declare(strict_types=1); namespace Rinvex\Attributes\Models\Type;
- Read upRead up
- Create a ticketCreate a ticket
File Attributable.php
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1); namespace Rinvex\Attributes\Traits;
- Create a ticketCreate a ticket
Avoid excessively long variable names like $throwValidationExceptions. Keep variable name length under 20. Open
protected $throwValidationExceptions = true;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Avoid excessively long variable names like $throwValidationExceptions. Keep variable name length under 20. Open
protected $throwValidationExceptions = true;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Function handle
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function handle(Entity $entity): void { $this->trash = $entity->getEntityAttributeValueTrash(); // Wrap the whole process inside database transaction
- Read upRead up
- Create a ticketCreate a ticket
Method handle
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle(Entity $entity): void { $this->trash = $entity->getEntityAttributeValueTrash(); // Wrap the whole process inside database transaction
- Create a ticketCreate a ticket
Function __wakeup
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function __wakeup() { parent::__wakeup(); if ($this->entityAttributeRelations && is_string(current($this->entityAttributeRelations))) {
- Read upRead up
- Create a ticketCreate a ticket
Function __sleep
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function __sleep() { if ($this->entityAttributeRelations && current($this->entityAttributeRelations) instanceof Closure) { $relations = $this->entityAttributeRelations; $this->entityAttributeRelations = [];
- Read upRead up
- Create a ticketCreate a ticket
Function handle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function handle(Entity $entity): void { // We will initially check if the model is using soft deletes. If so, // the attribute values will remain untouched as they should sill // be available till the entity is truly deleted from database.
- Read upRead up
- Create a ticketCreate a ticket
Avoid assigning values to variables in if clauses and the like (line '132', column '21'). Open
public function relationsToArray() { $eavAttributes = []; $attributes = parent::relationsToArray(); $relations = array_keys($this->getEntityAttributeRelations());
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Avoid unused parameters such as '$model'. Open
static::saved(function ($model) use ($entities) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks