ContentfulDeleteEntryJob::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Digia\Lumen\ContentfulSync\Jobs;
4
5
/**
6
 * Class ContentfulDeleteEntryJob
7
 * @package Digia\Lumen\ContentfulSync\Jobs
8
 */
9
final class ContentfulDeleteEntryJob extends ContentfulSyncJob
10
{
11
12
    /**
13
     * @var string
14
     */
15
    private $contentType;
16
17
    /**
18
     * @var string
19
     */
20
    private $entryId;
21
22
    /**
23
     * ContentfulDeleteEntryJob constructor.
24
     *
25
     * @param string $contentType
26
     * @param string $entryId
27
     */
28
    public function __construct(string $contentType, string $entryId)
29
    {
30
        $this->contentType = $contentType;
31
        $this->entryId     = $entryId;
32
    }
33
34
    /**
35
     * @inheritdoc
36
     */
37
    public function handle(): void
38
    {
39
        $this->getContentfulSyncService()->handleEntryDeleted($this->contentType, $this->entryId);
40
    }
41
}
42