Detector::autorun()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 6
cts 6
cp 1
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
namespace Redaxscript\Bootstrap;
3
4
use Redaxscript\Detector as BaseDetector;
5
6
/**
7
 * children class to boot the detector
8
 *
9
 * @since 3.1.0
10
 *
11
 * @package Redaxscript
12
 * @category Bootstrap
13
 * @author Henry Ruhs
14
 */
15
16
class Detector extends BootstrapAbstract
17
{
18
	/**
19
	 * automate run
20
	 *
21
	 * @since 3.1.0
22
	 */
23
24 1
	public function autorun() : void
25
	{
26 1
		$detectorLanguage = new BaseDetector\Language($this->_registry, $this->_request);
27 1
		$detectorTemplate = new BaseDetector\Template($this->_registry, $this->_request);
28
29
		/* set the registry */
30
31 1
		$this->_registry->set('language', $detectorLanguage->getOutput());
32 1
		$this->_registry->set('template', $detectorTemplate->getOutput());
33 1
	}
34
}
35