Completed
Push — master ( 392d04...e48b3d )
by Pavel
02:16
created

TButtonCaret   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 31
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setCaret() 0 6 1
A hasCaret() 0 4 1
1
<?php
2
3
/**
4
 * @copyright   Copyright (c) 2015 ublaboo <[email protected]>
5
 * @author      Pavel Janda <[email protected]>
6
 * @package     Ublaboo
7
 */
8
9
namespace Ublaboo\DataGrid\Traits;
10
11
trait TButtonCaret
12
{
13
14
	/**
15
	 * @var boolean
16
	 */
17
	protected $caret = TRUE;
18
19
20
	/**
21
	 * Should be a "caret" present in status dropdown?
22
	 * @param bool $use_caret
23
	 * @return static
24
	 */
25
	public function setCaret($use_caret)
26
	{
27
		$this->caret = (bool) $use_caret;
28
29
		return $this;
30
	}
31
32
33
	/**
34
	 * @return boolean
35
	 */
36
	public function hasCaret()
37
	{
38
		return $this->caret;
39
	}
40
41
}
42