BorderWidth   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 8
dl 0
loc 15
rs 10
c 1
b 0
f 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A normalize() 0 10 2
1
<?php
2
3
declare(strict_types=1);
4
/**
5
 * BorderWidth 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 BorderWidth.
18
 */
19
class BorderWidth extends Normalizer
20
{
21
	/**
22
	 * {@inheritdoc}
23
	 */
24
	public function normalize($ruleValue, string $ruleName = ''): array
25
	{
26
		if (null !== $this->normalized) {
27
			return $this->normalized;
28
		}
29
		return $this->normalized = $this->normalizeMultiValues([
30
			'border-top-width',
31
			'border-right-width',
32
			'border-bottom-width',
33
			'border-left-width', ], $ruleValue);
34
	}
35
}
36