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

RaderAjax::__construct()   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 RaderAjax.
5
 * @author Niklas Dougherty
6
 */
7
8
declare(strict_types=1);
9
10
namespace Tips\Ajax;
11
12
use Tips\Klasser\Preludium;
13
use Tips\Egenskaper\Ajax;
14
15
/**
16
 * Ajaxanrop ligger utanför ordinarie ordning.
17
 */
18 1
require_once dirname(__FILE__) . '/../../vendor/autoload.php';
19 1
new Preludium();
20
21
/**
22
 * Klass RaderAjax.
23
 * @SuppressWarnings("PHPMD.UnusedPrivateMethod")
24
 */
25
final class RaderAjax {
26
	use Ajax;
0 ignored issues
show
Bug introduced by
The trait Tips\Egenskaper\Ajax requires the property $logg which is not provided by Tips\Ajax\RaderAjax.
Loading history...
27
28
	/**
29
	 * Inititiera.
30
	 */
31 1
	public function __construct() {
32 1
		$this->förgrena();
33
	}
34
35
	/**
36
	 * Hämta fil med sparade rader.
37
	 * klasser/Spelade: visa_genererade_rader()
38
	 */
39 1
	private function fil(): void {
0 ignored issues
show
Unused Code introduced by
The method fil() 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...
40 1
		$fil = is_string($_REQUEST['fil']) ? base64_decode($_REQUEST['fil'], true) : false;
41 1
		if ($fil !== false) {
42 1
			echo file_get_contents(BAS . GENERERADE . htmlspecialchars($fil));
43
		}
44
	}
45
}
46
47
new RaderAjax();
48