ExcelBuilder::getWorksheetName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Pim\Bundle\ExcelConnectorBundle\Excel\Builder;
4
5
use Symfony\Component\OptionsResolver\OptionsResolver;
6
7
/**
8
 * Excel builder for single tabbed files
9
 *
10
 * @author    Antoine Guigan <[email protected]>
11
 * @copyright 2013 Akeneo SAS (http://www.akeneo.com)
12
 * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
13
 */
14
class ExcelBuilder extends AbstractExcelBuilder
15
{
16
    /**
17
     * {@inheritdoc}
18
     */
19
    protected function getWorksheetName(array $data)
20
    {
21
        return $this->options['worksheet_name'];
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    protected function setDefaultOptions(OptionsResolver $resolver)
28
    {
29
        parent::setDefaultOptions($resolver);
30
        $resolver->setDefaults(['worksheet_name' => 'EXPORT']);
31
    }
32
}
33