Completed
Push — master ( 3ddc25...0326c3 )
by Freek
02:34
created

ModelCleanedEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 5
rs 9.4285
c 1
b 0
f 1
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace Spatie\ModelCleanup;
4
5
use Illuminate\Queue\SerializesModels;
6
7
class ModelCleanedEvent
8
{
9
10
    /**
11
     * Holds the model class name.
12
     * @var string
13
     */
14
    public $modelName;
15
16
    /**
17
     * Holds the number of deleted records for the model.
18
     * @var int
19
     */
20
    public $numberOfDeletedRecords;
21
22
    /**
23
     * Create a new event instance.
24
     *
25
     * @param  string  $modelName
26
     * @param  int  $numberOfDeletedRecords
27
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
28
     */
29
    public function __construct(string $modelName, int $numberOfDeletedRecords)
30
    {
31
        $this->modelName = $modelName;
32
        $this->numberOfDeletedRecords = $numberOfDeletedRecords;
33
    }
34
}