Completed
Pull Request — master (#10)
by
unknown
02:45
created

WriterOptions::__get()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2.0625

Importance

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