Completed
Push — master ( a5a753...454108 )
by Wachter
07:05
created

TaskBuilder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 22
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setSystemKey() 0 10 2
1
<?php
2
3
/*
4
 * This file is part of php-task library.
5
 *
6
 * (c) php-task
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Task\TaskBundle\Builder;
13
14
use Task\Builder\TaskBuilder as BaseTaskBuilder;
15
use Task\Builder\TaskBuilderInterface;
16
use Task\TaskBundle\Entity\Task;
17
18
/**
19
 * Extends base task-builder.
20
 */
21
class TaskBuilder extends BaseTaskBuilder
22
{
23
    /**
24
     * Set system-key.
25
     *
26
     * @param string $systemKey
27
     *
28
     * @return TaskBuilderInterface
29
     *
30
     * @throws NotSupportedMethodException
31
     */
32 3
    public function setSystemKey($systemKey)
33
    {
34 3
        if (!$this->task instanceof Task) {
35 1
            throw new NotSupportedMethodException('systemKey', $this->task);
36
        }
37
38 2
        $this->task->setSystemKey($systemKey);
39
40 2
        return $this;
41
    }
42
}
43