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

RaderAjax   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 18
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fil() 0 4 3
A __construct() 0 2 1
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