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

WriterOptions   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 88.89%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 23
ccs 8
cts 9
cp 0.8889
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __set() 0 9 2
A __get() 0 8 2
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
}