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

HGAjax::hg_min()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Klass HGAjax.
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\HG\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 HGAjax.
24
 * @SuppressWarnings("PHPMD.UnusedPrivateMethod")
25
 */
26
final class HGAjax {
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\HGAjax.
Loading history...
28
	use Konstanter;
29
30 1
	public function __construct() {
31 1
		$this->förgrena();
32
	}
33
34
	/**
35
	 * Håll HG inom godtagbara intervall.
36
	 */
37 1
	private function hg_min(): void {
0 ignored issues
show
Unused Code introduced by
The method hg_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
		$this->db_preferenser->validera_indata('hg_min', self::HG_MIN, self::HG_MAX, self::HG_STD, 'hg.hg_min');
0 ignored issues
show
Bug introduced by
The constant Tips\Moduler\Ajax\HGAjax::HG_MIN was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
Bug introduced by
The constant Tips\Moduler\Ajax\HGAjax::HG_STD was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
Bug introduced by
The constant Tips\Moduler\Ajax\HGAjax::HG_MAX was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
39
	}
40
41
	/**
42
	 * Spara attraktionsfaktor.
43
	 */
44 1
	private function attraktionsfaktor(): void {
0 ignored issues
show
Unused Code introduced by
The method attraktionsfaktor() 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...
45 1
		$this->ändra_attraktionsfaktor('hg');
46
	}
47
}
48
49
new HGAjax();
50