Completed
Push — master ( 670b18...db08df )
by Matthias
10s
created

AbstractMichelfPHPMarkdown::setParserOptions()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 3.0261

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 6
cts 7
cp 0.8571
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 4
nc 3
nop 2
crap 3.0261
1
<?php
2
3
/**
4
 * @author Matthias Glaub <[email protected]>
5
 */
6
7
namespace MaglMarkdown\Adapter;
8
9
abstract class AbstractMichelfPHPMarkdown
10
{
11
    /**
12
     * @param mixed      $parser
13
     * @param array|null $options
14
     */
15 4
    protected function setParserOptions($parser, $options = null)
16
    {
17 4
        if (is_array($options)) {
18 2
            foreach ($options as $key => $value) {
19
                $parser->$key = $value;
20 2
            }
21 2
        }
22 4
    }
23
}
24