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

AccordionBuilder   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 17
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setOpen() 0 4 2
A setMultiExpand() 0 4 2
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
}