RepositoryEntityCreating::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Salah3id\Domains\Repository\Events;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Salah3id\Domains\Repository\Contracts\RepositoryInterface;
7
8
/**
9
 * Class RepositoryEntityCreated
10
 *
11
 * @package Salah3id\Domains\Repository\Events
12
 * @author Anderson Andrade <[email protected]>
13
 */
14
class RepositoryEntityCreating extends RepositoryEventBase
15
{
16
    /**
17
     * @var string
18
     */
19
    protected $action = "creating";
20
21
    public function __construct(RepositoryInterface $repository, array $model)
22
    {
23
        parent::__construct($repository);
24
        $this->model = $model;
0 ignored issues
show
Documentation Bug introduced by
It seems like $model of type array is incompatible with the declared type Illuminate\Database\Eloquent\Model of property $model.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
25
    }
26
}
27