Completed
Push — master ( 39caf5...4ceab2 )
by Sam
02:39
created

LimitTrait::limit()

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 1
ccs 0
cts 0
cp 0
nc 1
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 mixed
18
	 */
19 1
	public function filterByLimit($limit)
20
	{
21 1
		if ($limit !== null)
22 1
			$this->limit($limit);
23
24 1
		return $this;
25
	}
26
27
28
	public abstract function limit($limit);
29
30
}
31