Total Complexity | 2 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | class Post extends Model |
||
11 | { |
||
12 | use CustomSlugify; |
||
13 | use Sluggable; |
||
14 | |||
15 | protected $fillable = [ |
||
16 | 'post_author', 'post_content', 'post_title', |
||
17 | 'post_excerpt', 'post_status', 'comment_status', 'ping_status', 'post_password', |
||
18 | 'post_name', 'to_ping', 'pinged', |
||
19 | 'post_content_filtered', 'post_parent', 'guid', 'menu_order', 'post_type', 'post_mime_type', 'comment_count' |
||
20 | ]; |
||
21 | |||
22 | public static function boot() |
||
23 | { |
||
24 | parent::boot(); |
||
25 | |||
26 | self::creating(function($model){ |
||
|
|||
27 | // ... code here |
||
28 | }); |
||
29 | |||
30 | self::created(function($model){ |
||
31 | // ... code here |
||
32 | }); |
||
33 | |||
34 | self::updating(function($model){ |
||
35 | // ... code here |
||
36 | }); |
||
37 | |||
38 | self::updated(function($model){ |
||
39 | // ... code here |
||
40 | }); |
||
41 | |||
42 | self::deleting(function($model){ |
||
43 | // ... code here |
||
44 | }); |
||
45 | |||
46 | self::deleted(function($model){ |
||
47 | // ... code here |
||
48 | }); |
||
49 | } |
||
50 | |||
51 | public function sluggable() |
||
58 | } |
||
59 | ] |
||
63 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.