Passed
Push — master ( 4ab464...4b6cc5 )
by Steve
03:28
created

AccordionBuilder::setOpen()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 2
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace StoutLogic\AcfBuilder;
4
5
class AccordionBuilder extends TabBuilder
6
{
7
    public function __construct($name, $type = 'accordion', $config = [])
8
    {
9
       parent::__construct($name, $type, $config);
10
    }
11
12
    public function setOpen($value = 1)
13
    {
14
        return $this->setConfig('open', $value ? 1 : 0);
15
    }
16
17
    public function setMultiExpand($value = 1)
18
    {
19
        return $this->setConfig('multi_expand', $value ? 1 : 0);
20
    }
21
}