RelationMorphFromModelWasCleaned   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
dl 0
loc 24
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
namespace Cesargb\Database\Support\Events;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\Relations\Relation;
7
8
class RelationMorphFromModelWasCleaned
9
{
10
    public $model;
11
12
    public $relation;
13
14
    public $numDeleted;
15
16
    public $dryRun;
17
18
    /**
19
     * Event dispach when clean relations morph from model.
20
     *
21
     * @param  Model  $model
22
     * @param  Relation  $relation
23
     * @param  int  $numDeleted
24
     * @param  bool  $dryRun
25
     */
26
    public function __construct(Model $model, Relation $relation, int $numDeleted, bool $dryRun)
27
    {
28
        $this->model = $model;
29
        $this->relation = $relation;
30
        $this->numDeleted = $numDeleted;
31
        $this->dryRun = $dryRun;
32
    }
33
}
34