ModelNotFoundForTenantException::setModel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
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