Completed
Push — master ( a18119...0d7bb7 )
by Peter
05:52
created

AbstractFinder::withCursor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

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 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Maslosoft\Mangan\Abstracts;
4
5
/**
6
 * AbstractFinder
7
 *
8
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
9
 */
10
class AbstractFinder
11
{
12
13
	/**
14
	 * Whenever to use cursors
15
	 * @var bool
16
	 */
17
	private $useCursor = false;
18
19
	/**
20
	 * Whenever to use cursor
21
	 * @param bool $useCursor
22
	 * @return FinderInterface
23
	 */
24 69
	public function withCursor($useCursor = true)
25
	{
26 69
		$this->useCursor = $useCursor;
27 69
		return $this;
28
	}
29
30 18
	public function isWithCursor()
31
	{
32 18
		return $this->useCursor;
33
	}
34
35
}
36