CursorAwareTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 26
ccs 0
cts 5
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getUseCursor() 0 4 1
A setUseCursor() 0 5 1
1
<?php
2
3
/**
4
 * This software package is licensed under AGPL or Commercial license.
5
 *
6
 * @package maslosoft/mangan
7
 * @licence AGPL or Commercial
8
 * @copyright Copyright (c) Piotr Masełkowski <[email protected]>
9
 * @copyright Copyright (c) Maslosoft
10
 * @copyright Copyright (c) Others as mentioned in code
11
 * @link https://maslosoft.com/mangan/
12
 */
13
14
namespace Maslosoft\Mangan\Traits\Criteria;
15
16
use Maslosoft\Mangan\Interfaces\Criteria\CursorAwareInterface;
17
use Maslosoft\Mangan\Interfaces\CriteriaInterface;
18
19
/**
20
 * CursorAwareTrait
21
 * @see CursorAwareInterface
22
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
23
 */
24
trait CursorAwareTrait
25
{
26
27
	private $_useCursor = null;
28
29
	/**
30
	 * Whenever to use cursor
31
	 * @return bool Whever to use Cursor
32
	 */
33
	public function getUseCursor()
34
	{
35
		return $this->_useCursor;
36
	}
37
38
	/**
39
	 * Use cursor for fetching data
40
	 * @param bool $useCursor Whenever to use cursor
41
	 * @return CriteriaInterface
42
	 */
43
	public function setUseCursor($useCursor)
44
	{
45
		$this->_useCursor = $useCursor;
46
		return $this;
47
	}
48
49
}
50