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.
Completed
Push — master ( 6844c1...5a9a8d )
by Miša
08:04
created

SyncModelLanguageMapping::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace WeAreNeopix\LaravelModelTranslation\Jobs;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Database\Eloquent\Model;
7
use Illuminate\Queue\SerializesModels;
8
use Illuminate\Queue\InteractsWithQueue;
9
use Illuminate\Contracts\Queue\ShouldQueue;
10
use Illuminate\Foundation\Bus\Dispatchable;
11
12
class SyncModelLanguageMapping implements ShouldQueue
13
{
14
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
15
16
    /** @var \Illuminate\Database\Eloquent\Model */
17
    public $model;
18
19
    /** @var string */
20
    public $language;
21
22
    /**
23
     * Create a new job instance.
24
     *
25
     * @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...
26
     */
27
    public function __construct(Model $model, string $language)
28
    {
29
        $this->model = $model;
30
        $this->language = $language;
31
    }
32
33
    /**
34
     * Execute the job.
35
     *
36
     * @return void
37
     */
38
    public function handle()
39
    {
40
        Translation::driver('json')->syncModelsForLanguage($this->language, $this->model);
41
    }
42
}
43