EloquentRepository
has 27 functions (exceeds 20 allowed). Consider refactoring.
class EloquentRepository extends BaseRepository
{
* {@inheritdoc}
*/
BaseRepository
has 26 functions (exceeds 20 allowed). Consider refactoring.
abstract class BaseRepository implements RepositoryContract, CacheableContract
{
use Cacheable;
/**
Method prepareQuery
has 45 lines of code (exceeds 25 allowed). Consider refactoring.
protected function prepareQuery($model)
{
if (! empty($this->relations)) {
$model = $model->with($this->relations);
Function prepareQuery
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
protected function prepareQuery($model)
{
if (! empty($this->relations)) {
$model = $model->with($this->relations);
Function update
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
public function update($id, array $attributes = [], bool $syncRelations = false)
{
$updated = false;
Method bindRepository
has 5 arguments (exceeds 4 allowed). Consider refactoring.
protected function bindRepository($abstract, $concrete = null, $shared = true, $alias = null, $force = false): void
Function forgetCache
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
public function forgetCache()
{
if ($this->getCacheLifetime()) {
if (method_exists($this->getContainer('cache')->getStore(), 'tags')) {