ImageOptimized::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ImageOptimizer;
6
7
class ImageOptimized
8
{
9
	/**
10
	 * @var string $originalUrl
11
	 */
12
	public $originalUrl;
13
14
	/**
15
	 * @var string $originalUrl
16
	 */
17
    public $resizedUrl;
18
19
	/**
20
	 * @var string $originalUrl
21
	 */
22
    public $resizedWebpUrl;
23
24 3
	public function __construct(array $data)
25
	{
26 3
		$this->originalUrl = $data['original_url'] ?? null;
27 3
		$this->resizedUrl = $data['resized_url'] ?? null;
28 3
		$this->resizedWebpUrl = $data['resized_webp_url'] ?? null;
29 3
	}
30
}
31