ContentfulDeleteEntryJob   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A handle() 0 4 1
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