IndexableSlot::setSignal()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
/**
4
 * This software package is licensed under `AGPL-3.0-only, proprietary` license[s].
5
 *
6
 * @package maslosoft/manganel
7
 * @license AGPL-3.0-only, proprietary
8
 *
9
 * @copyright Copyright (c) Peter Maselkowski <[email protected]>
10
 * @link https://maslosoft.com/manganel/
11
 */
12
13
namespace Maslosoft\Manganel\Signals;
14
15
use Maslosoft\Ilmatar\Components\Managers\Model\SearchIndex;
16
use Maslosoft\Signals\Interfaces\SlotInterface;
17
use Maslosoft\Signals\ISignal;
18
19
/**
20
 * IndexableSlot
21
 *
22
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
23
 */
24
class IndexableSlot implements SlotInterface
25
{
26
27
	private $document = null;
28
29
	public function result()
30
	{
31
		return $this->document;
32
	}
33
34
	public function setSignal(ISignal $indexable)
35
	{
36
		$document = new SearchIndex;
37
		$document->model = $indexable;
38
		$this->document = $document;
39
	}
40
41
}
42