ModelNotFoundForTenantException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setModel() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Rinvex\Tenants\Exceptions;
6
7
use Illuminate\Database\Eloquent\ModelNotFoundException;
8
9
class ModelNotFoundForTenantException extends ModelNotFoundException
10
{
11
    /**
12
     * @param string    $model
13
     * @param int|array $ids
14
     *
15
     * @return $this
16
     */
17
    public function setModel($model, $ids = [])
18
    {
19
        $this->model = $model;
20
        $this->message = "No query results for model [{$model}] when scoped by tenant.";
21
22
        return $this;
23
    }
24
}
25