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

VinstgrafAjax   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 23
dl 0
loc 35
ccs 24
cts 24
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A utdelning_13_min() 0 24 1
A __construct() 0 2 1
1
<?php
2
3
/**
4
 * Klass VinstgrafAjax.
5
 * @author Niklas Dougherty
6
 */
7
8
declare(strict_types=1);
9
10
namespace Tips\Moduler\Ajax;
11
12
use Tips\Klasser\Preludium;
13
use Tips\Egenskaper\Ajax;
14
use Tips\Moduler\Vinstgraf\Konstanter;
15
16
/**
17
 * Ajaxanrop ligger utanför ordinarie ordning.
18
 */
19 1
require_once dirname(__FILE__) . '/../../../vendor/autoload.php';
20 1
new Preludium();
21
22
/**
23
 * Klass VinstgrafAjax.
24
 * @SuppressWarnings("PHPMD.UnusedPrivateMethod")
25
 */
26
final class VinstgrafAjax {
27
	use Ajax;
0 ignored issues
show
Bug introduced by
The trait Tips\Egenskaper\Ajax requires the property $logg which is not provided by Tips\Moduler\Ajax\VinstgrafAjax.
Loading history...
28
	use Konstanter;
29
30 1
	public function __construct() {
31 1
		$this->förgrena();
32
	}
33
34
	/**
35
	 * Spara intervall för vinst vid 13 rätt.
36
	 */
37 1
	private function utdelning_13_min(): void {
0 ignored issues
show
Unused Code introduced by
The method utdelning_13_min() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
38 1
		$utdelning_13_min = (int) $this->db_preferenser->validera_indata(
39 1
			'utdelning_13_min',
40 1
			self::UTDELNING_13_MIN_MIN,
0 ignored issues
show
Bug introduced by
The constant Tips\Moduler\Ajax\Vinstg...x::UTDELNING_13_MIN_MIN was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
41 1
			self::UTDELNING_13_MIN_MAX,
0 ignored issues
show
Bug introduced by
The constant Tips\Moduler\Ajax\Vinstg...x::UTDELNING_13_MIN_MAX was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
42 1
			self::UTDELNING_13_MIN_STD,
0 ignored issues
show
Bug introduced by
The constant Tips\Moduler\Ajax\Vinstg...x::UTDELNING_13_MIN_STD was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
43 1
			'vinstgraf.utdelning_13_min'
44 1
		);
45
46 1
		$utdelning_13_max = (int) $this->db_preferenser->validera_indata(
47 1
			'utdelning_13_max',
48 1
			self::UTDELNING_13_MAX_MIN,
0 ignored issues
show
Bug introduced by
The constant Tips\Moduler\Ajax\Vinstg...x::UTDELNING_13_MAX_MIN was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
49 1
			self::UTDELNING_13_MAX_MAX,
0 ignored issues
show
Bug introduced by
The constant Tips\Moduler\Ajax\Vinstg...x::UTDELNING_13_MAX_MAX was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
50 1
			self::UTDELNING_13_MAX_STD,
0 ignored issues
show
Bug introduced by
The constant Tips\Moduler\Ajax\Vinstg...x::UTDELNING_13_MAX_STD was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
51 1
			'vinstgraf.utdelning_13_max'
52 1
		);
53
54 1
		$this->db_preferenser->komparera_preferenser(
55 1
			$utdelning_13_min,
56 1
			$utdelning_13_max,
57 1
			self::UTDELNING_13_MIN_STD,
58 1
			self::UTDELNING_13_MAX_STD,
59 1
			'vinstgraf.utdelning_13_min',
60 1
			'vinstgraf.utdelning_13_max'
61 1
		);
62
	}
63
}
64
65
new VinstgrafAjax();
66