Completed
Push — master ( 17312a...d17d72 )
by Mario
03:12
created

WorkspaceTasks::__construct()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 4
Bugs 1 Features 1
Metric Value
c 4
b 1
f 1
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
cc 2
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Marek\Toggable\API\Http\Request\Workspace;
4
5
/**
6
 * Class WorkspaceTasks
7
 * @package Marek\Toggable\API\Http\Request\Workspace
8
 *
9
 * @property-read boolean $active
10
 */
11
class WorkspaceTasks extends Workspace
12
{
13
    /**
14
     * @var string
15
     */
16
    public $uri = 'workspaces/{workspace_id}/tasks?active={active}';
17
18
    /**
19
     * @var boolean
20
     */
21
    public $active = true;
22
23
    /**
24
     * WorkspaceTasks constructor.
25
     *
26
     * @param array $properties
27
     */
28 5
    public function __construct(array $properties)
29
    {
30 5
        parent::__construct($properties);
31
32 5
        $this->uri = str_replace('{active}', $this->active ? 'true' : 'false', $this->uri);
33 5
    }
34
}
35