TMobileDetect::injectMobileDetector()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 1
1
<?php
2
/**
3
 * TMobileDetect.php
4
 *
5
 * @copyright      More in license.md
6
 * @license        https://www.ipublikuj.eu
7
 * @author         Adam Kadlec <[email protected]>
8
 * @package        iPublikuj:MobileDetect!
9
 * @subpackage     common
10
 * @since          1.0.0
11
 *
12
 * @date           24.04.14
13
 */
14
15
declare(strict_types = 1);
16
17
namespace IPub\MobileDetect;
18
19
use IPub\MobileDetect\Helpers;
20
21
/**
22
 * Mobile detect trait for presenters & components
23
 *
24
 * @package        iPublikuj:MobileDetect!
25
 * @subpackage     common
26
 *
27
 * @author         Adam Kadlec <[email protected]>
28
 */
29 1
trait TMobileDetect
30
{
31
	/**
32
	 * @var MobileDetect
33
	 */
34
	protected $mobileDetect;
35
36
	/**
37
	 * @var Helpers\DeviceView
38
	 */
39
	protected $deviceView;
40
41
	/**
42
	 * @param MobileDetect $mobileDetect
43
	 * @param Helpers\DeviceView $deviceView
44
	 *
45
	 * @return void
46
	 */
47
	public function injectMobileDetector(MobileDetect $mobileDetect, Helpers\DeviceView $deviceView) : void
48
	{
49 1
		$this->mobileDetect = $mobileDetect;
50 1
		$this->deviceView = $deviceView;
51 1
	}
52
}
53