Completed
Pull Request — master (#38)
by Wachter
23:47
created

TaskBuilder::setSystemKey()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 1
1
<?php
2
3
namespace Task\TaskBundle\Builder;
4
5
use Task\Builder\TaskBuilder as BaseTaskBuilder;
6
use Task\Builder\TaskBuilderInterface;
7
use Task\TaskBundle\Entity\Task;
8
9
/**
10
 * TODO add description here
11
 */
12
class TaskBuilder extends BaseTaskBuilder
13
{
14
    /**
15
     * Set system-key.
16
     *
17
     * @param string $systemKey
18
     *
19
     * @return TaskBuilderInterface
20
     *
21
     * @throws NotSupportedException
22
     */
23
    public function setSystemKey($systemKey)
24
    {
25
        if (!$this->task instanceof Task) {
0 ignored issues
show
Bug introduced by
The property task cannot be accessed from this context as it is declared private in class Task\Builder\TaskBuilder.

This check looks for access to properties that are not accessible from the current context.

If you need to make a property accessible to another context you can either raise its visibility level or provide an accessible getter in the defining class.

Loading history...
26
            throw new NotSupportedException('systemKey', $this->task);
0 ignored issues
show
Bug introduced by
The property task cannot be accessed from this context as it is declared private in class Task\Builder\TaskBuilder.

This check looks for access to properties that are not accessible from the current context.

If you need to make a property accessible to another context you can either raise its visibility level or provide an accessible getter in the defining class.

Loading history...
27
        }
28
29
        $this->task->setSystemKey($systemKey);
0 ignored issues
show
Bug introduced by
The property task cannot be accessed from this context as it is declared private in class Task\Builder\TaskBuilder.

This check looks for access to properties that are not accessible from the current context.

If you need to make a property accessible to another context you can either raise its visibility level or provide an accessible getter in the defining class.

Loading history...
30
31
        return $this;
32
    }
33
}
34