Completed
Pull Request — master (#5)
by ARCANEDEV
16:36 queued 10:30
created

AbstractManager   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 34
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDefaultDriver() 0 4 1
A getDriverOptions() 0 4 1
1
<?php namespace Arcanedev\LaravelExcel;
2
3
use Illuminate\Support\Manager;
4
5
/**
6
 * Class     AbstractManager
7
 *
8
 * @package  Arcanedev\LaravelExcel
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
abstract class AbstractManager extends Manager
12
{
13
    /* -----------------------------------------------------------------
14
     |  Getters & Setters
15
     | -----------------------------------------------------------------
16
     */
17
18
    /**
19
     * Get the default driver name.
20
     *
21
     * @return string
22
     */
23 3
    public function getDefaultDriver()
24
    {
25 3
        return $this->app['config']->get('excel.default');
26
    }
27
28
    /* -----------------------------------------------------------------
29
     |  Other Methods
30
     | -----------------------------------------------------------------
31
     */
32
33
    /**
34
     * Get the driver options.
35
     *
36
     * @param  string  $driver
37
     *
38
     * @return array
39
     */
40 21
    protected function getDriverOptions($driver)
41
    {
42 21
        return $this->app['config']->get("excel.drivers.$driver.options", []);
43
    }
44
}
45