GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

PushNotificationJob   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 32
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A handle() 0 6 1
1
<?php
2
3
namespace Webelightdev\LaravelPushNotification\Jobs;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Contracts\Queue\ShouldQueue;
7
use Illuminate\Foundation\Bus\Dispatchable;
8
use Illuminate\Queue\InteractsWithQueue;
9
use Illuminate\Queue\SerializesModels;
10
11
class PushNotificationJob implements ShouldQueue
12
{
13
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
14
15
    protected $deviceTokens;
16
    protected $message;
17
    protected $action;
18
19
    /**
20
     * Create a new job instance.
21
     *
22
     * @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...
23
     */
24
    public function __construct($deviceTokens, $message, $action)
25
    {
26
        $this->deviceTokens = $deviceTokens;
27
        $this->message = $message;
28
        $this->action = $action;
29
    }
30
31
    /**
32
     * Execute the job.
33
     *
34
     * @return void
35
     */
36
    public function handle()
37
    {
38
        $adapter = config('push-notification.adapter');
39
        $objAdapter = new $adapter();
40
        $objAdapter->pushNotification($this->deviceTokens, $this->message, $this->action);
41
    }
42
}
43