RepositoryEntityCreating   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
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