TransformOrigin::normalize()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 2
nc 2
nop 2
1
<?php
2
3
declare(strict_types=1);
4
/**
5
 * TransformOrigin 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 TransformOrigin.
18
 */
19
class TransformOrigin extends Normalizer
20
{
21
	public function normalize($ruleValue, string $ruleName = ''): array
22
	{
23
		if (null !== $this->normalized) {
24
			return $this->normalized;
25
		}
26
		$values = $this->getNumberValues($ruleValue);
0 ignored issues
show
Unused Code introduced by
The assignment to $values is dead and can be removed.
Loading history...
27
		return [
28
			'transform-origin' => [$x, $y],
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $x seems to be never defined.
Loading history...
Comprehensibility Best Practice introduced by
The variable $y seems to be never defined.
Loading history...
29
		];
30
	}
31
}
32