GetCurrentUser   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
3
namespace Marek\Toggable\API\Http\Request\Users;
4
5
use Marek\Toggable\API\Http\Request\Request;
6
7
/**
8
 * Class GetCurrentUser
9
 * @package Marek\Toggable\API\Http\Request\Users
10
 *
11
 * @property-read boolean $relatedData
12
 */
13
class GetCurrentUser extends Request
14
{
15
    /**
16
     * @var string
17
     */
18
    protected $uri = 'me';
19
20
    /**
21
     * @var boolean
22
     */
23
    protected $relatedData = false;
24
25
    /**
26
     * GetCurrentUser constructor.
27
     *
28
     * @param array $properties
29
     */
30 6
    public function __construct(array $properties)
31
    {
32 6
        parent::__construct($properties);
33
34 6
        if ($this->relatedData === true) {
35 5
            $this->uri = $this->uri . '?with_related_data=true';
36 5
        }
37 6
    }
38
}
39