Membership   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A setSection() 0 4 1
1
<?php
2
3
namespace Helix\Asana\Task;
4
5
use Helix\Asana\Base\Data;
6
use Helix\Asana\Project;
7
use Helix\Asana\Project\Section;
8
use Helix\Asana\Task;
9
10
/**
11
 * A task's membership.
12
 *
13
 * @see https://developers.asana.com/docs/task
14
 *
15
 * @method Project getProject ()
16
 * @method Section getSection ()
17
 */
18
class Membership extends Data {
19
20
    protected const MAP = [
21
        'project' => Project::class,
22
        'section' => Section::class
23
    ];
24
25
    /**
26
     * @depends create-only
27
     *
28
     * @see Task::addToProject()
29
     *
30
     * @param Section $section
31
     * @return $this
32
     */
33
    final public function setSection (Section $section) {
34
        $this->_set('project', $section->getProject());
35
        $this->_set('section', $section);
36
        return $this;
37
    }
38
}