LimitTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 18
rs 10
ccs 5
cts 5
cp 1
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A filterByLimit() 0 6 2
1
<?php
2
3
namespace Jalle19\StatusManager\Database;
4
5
/**
6
 * Class LimitTrait
7
 * @package   Jalle19\StatusManager\Database
8
 * @copyright Copyright &copy; Sam Stenvall 2016-
9
 * @license   https://www.gnu.org/licenses/gpl.html The GNU General Public License v2.0
10
 */
11
trait LimitTrait
12
{
13
14
	/**
15
	 * @param int|null $limit
16
	 *
17
	 * @return $this
18
	 */
19 1
	public function filterByLimit($limit)
20
	{
21 1
		if ($limit !== null)
22 1
			$this->limit($limit);
23
24 1
		return $this;
25 1
	}
26
27
28
	public abstract function limit($limit);
29
30
}
31