Segment   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A value() 0 4 1
1
<?php
2
3
namespace Devhelp\Piwik\Api\Param;
4
5
use Devhelp\Piwik\Api\Param\Segment\Segment as SegmentQuery;
6
7
/**
8
 * Adapter for Segment (to be used as Param)
9
 */
10
class Segment implements Param
11
{
12
13
    /**
14
     * @var SegmentQuery
15
     */
16
    private $segment;
17
18
    public function __construct(SegmentQuery $segment)
19
    {
20
        $this->segment = $segment;
21
    }
22
23
    /**
24
     * returns param value
25
     *
26
     * @return string
27
     */
28
    public function value()
29
    {
30
        return $this->segment->getQuery();
31
    }
32
}
33