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

AbstractFinder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A withCursor() 0 5 1
A isWithCursor() 0 4 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