Completed
Pull Request — master (#10)
by
unknown
03:21
created

WriterOptions::__set()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 9
rs 9.6666
cc 2
eloc 5
nc 2
nop 2
1
<?php
2
3
namespace Flagbit\Plantuml\TokenReflection;
4
5
class WriterOptions
6
{
7
    private $withoutFunctionParameter = false;
8
9
    public function __set($optionName, $value)
10
    {
11
        switch($optionName)
12
        {
13
            case 'withoutFunctionParameter':
14
                $this->withoutFunctionParameter = (bool) $value;
15
                break;
16
        }
17
    }
18
19
    public function __get($optionName)
20
    {
21
        switch($optionName)
22
        {
23
            case 'withoutFunctionParameter':
24
                return $this->withoutFunctionParameter;
25
        }
26
    }
27
}