Background::normalize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 6
c 1
b 1
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
/**
5
 * Background class.
6
 *
7
 * @package   YetiForcePDF\Style\Normalizer
8
 *
9
 * @copyright YetiForce Sp. z o.o
10
 * @license   MIT
11
 * @author    Rafal Pospiech <[email protected]>
12
 */
13
14
namespace YetiForcePDF\Style\Normalizer;
15
16
/**
17
 * Class Background.
18
 */
19
class Background extends Normalizer
20
{
21
	public function normalize($ruleValue, string $ruleName = ''): array
22
	{
23
		$normalizerName = \YetiForcePDF\Style\Normalizer\Normalizer::getNormalizerClassName('background-color');
24
		return (new $normalizerName())
25
			->setDocument($this->document)
26
			->setStyle($this->style)
27
			->init()
28
			->normalize($ruleValue, $ruleName);
29
	}
30
}
31