Completed
Pull Request — master (#375)
by Dalibor
03:02
created

ColumnSummary   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 49
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getMethod() 0 4 1
A setMethod() 0 5 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Dalibor
5
 * Date: 27.9.2016.
6
 * Time: 14:44
7
 */
8
9
namespace Ublaboo\DataGrid\Column;
10
11
12
class ColumnSummary
13
{
14
	/**
15
	 * @var string
16
	 */
17
	protected $column;
18
19
	/**
20
	 * @var string
21
	 */
22
	protected $method;
23
24
	public static $method_sum = 'sum';
25
26
	public static $method_avg = 'avg';
27
28
	public static $method_min = 'min';
29
30
	public static $method_max = 'min';
31
32
	/**
33
	 * ColumnSummary constructor.
34
	 * @param string $column
35
	 */
36
	public function __construct($column)
37
	{
38
		$this->column = $column;
39
	}
40
41
42
	/**
43
	 * @return string
44
	 */
45
	public function getMethod()
46
	{
47
		return $this->method;
48
	}
49
50
51
	/**
52
	 * @param string $method use ColumnSummary::$method_...
53
	 * @return ColumnSummary
54
	 */
55
	public function setMethod($method)
56
	{
57
		$this->method = $method;
58
		return $this;
59
	}
60
}