Location   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 12 2
1
<?php
2
/**
3
 * @author: Tamás Kovács <[email protected]>
4
 */
5
6
namespace Callisto\RequestParameter;
7
8
use Callisto\RequestParameter;
9
10
11
class Location extends RequestParameter
12
{
13
	/**
14
	 * @var string
15
	 */
16
	protected $key = 'locations';
17
18
19
	/**
20
	 * @return string
21
	 */
22
	public function getValue() : string
23
	{
24 1
		$values = array_map(function($value) {
25 1
			if (is_array($value)) {
26 1
				return implode(',', $value);
27
			}
28
29 1
			return $value;
30 1
		}, $this->value);
31
32 1
		return implode(',', $values);
33
	}
34
}
35