Passed
Push — main ( e5ef3a...f1ef56 )
by N.
04:15
created

Vinstspridning   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 87.5%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 16
ccs 7
cts 8
cp 0.875
rs 10
c 0
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A visa_vinstspridning() 0 12 3
1
<?php
2
3
/**
4
 * Klass Vinstspridning.
5
 * @author Niklas Dougherty
6
 */
7
8
declare(strict_types=1);
9
10
namespace Tips\Klasser;
11
12
use Tips\Klasser\Vinstspridning\Rita;
13
14
/**
15
 * Klass Vinstspridning.
16
 */
17
final class Vinstspridning extends Rita {
18
	/**
19
	 * Visa vinstspridning.
20
	 */
21 2
	public function visa_vinstspridning(): string {
22 2
		if ($this->tipsrad_012 === '') {
23
			return '';
24
		}
25
26 2
		$this->graf = new Graf();
27 2
		$this->bildfil = VINSTSPRIDNING . "/{$this->tipsrad_012}.png";
28 2
		if (!file_exists(GRAF . $this->bildfil)) {
29 1
			$this->rita();
30
		}
31
32 2
		return $this->graf->rendera_tipsgraf($this->bildfil);
33
	}
34
}
35