Completed
Push — ezp-30882-thumbnail ( 274ed9 )
by
unknown
19:23
created

StaticStrategy::getThumbnail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace eZ\Publish\Core\Repository\Strategy\ContentThumbnail;
4
5
use eZ\Publish\API\Repository\Values\ContentType\ContentType;
6
use eZ\Publish\SPI\Repository\Strategy\ContentThumbnail\ThumbnailStrategy;
7
8
class StaticStrategy implements ThumbnailStrategy
9
{
10
    /** @var string */
11
    private $staticThumbnail;
12
13
    public function __construct(string $staticThumbnail)
14
    {
15
        $this->staticThumbnail = $staticThumbnail;
16
    }
17
18
    public function getThumbnail(ContentType $contentType, array $fields): ?string
19
    {
20
        return $this->staticThumbnail;
21
    }
22
}