SubscriptionObserver   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 35
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A updated() 0 2 1
A created() 0 3 1
A deleted() 0 2 1
1
<?php
2
3
namespace Faithgen\Miscellaneous\Observers;
4
5
use Faithgen\Miscellaneous\Models\Subscription;
6
use Faithgen\Miscellaneous\Notifications\ApproveSubscription;
7
8
class SubscriptionObserver
9
{
10
    /**
11
     * Handle the subscription "created" event.
12
     *
13
     * @param  \Faithgen\Miscellaneous\Models\Subscription  $subscription
14
     *
15
     * @return void
16
     */
17
    public function created(Subscription $subscription)
18
    {
19
        $subscription->notify(new ApproveSubscription());
20
    }
21
22
    /**
23
     * Handle the subscription "updated" event.
24
     *
25
     * @param  \Faithgen\Miscellaneous\Models\Subscription  $subscription
26
     *
27
     * @return void
28
     */
29
    public function updated(Subscription $subscription)
0 ignored issues
show
Unused Code introduced by
The parameter $subscription is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

29
    public function updated(/** @scrutinizer ignore-unused */ Subscription $subscription)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
30
    {
31
        //
32
    }
33
34
    /**
35
     * Handle the subscription "deleted" event.
36
     *
37
     * @param  \Faithgen\Miscellaneous\Models\Subscription  $subscription
38
     *
39
     * @return void
40
     */
41
    public function deleted(Subscription $subscription)
0 ignored issues
show
Unused Code introduced by
The parameter $subscription is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

41
    public function deleted(/** @scrutinizer ignore-unused */ Subscription $subscription)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
42
    {
43
        //
44
    }
45
}
46