ContentfulPublishAssetJob::__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 ContentfulPublishAssetJob
7
 * @package Digia\Lumen\ContentfulSync\Jobs
8
 */
9
final class ContentfulPublishAssetJob extends ContentfulSyncJob
10
{
11
12
    /**
13
     * @var string
14
     */
15
    private $assetJson;
16
17
    /**
18
     * @var bool
19
     */
20
    private $ignoreExisting;
21
22
    /**
23
     * ContentfulPublishEntryJob constructor.
24
     *
25
     * @param string $assetJson
26
     * @param bool   $ignoreExisting
27
     */
28
    public function __construct(string $assetJson, bool $ignoreExisting)
29
    {
30
        $this->assetJson      = $assetJson;
31
        $this->ignoreExisting = $ignoreExisting;
32
    }
33
34
    /**
35
     * @inheritdoc
36
     */
37
    public function handle(): void
38
    {
39
        $this->getContentfulSyncService()->handleAssetPublished($this->assetJson, $this->ignoreExisting);
40
    }
41
}
42