Completed
Push — master ( 5227c9...65121f )
by Maxime
04:44
created

Application::storagePath()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 0
1
<?php
2
3
namespace Distilleries\Expendable\Fondation;
4
5
6
use Distilleries\Expendable\ExpendableRoutingServiceProvider;
7
use Illuminate\Events\EventServiceProvider;
8
use Illuminate\Foundation\Application as BaseApplication;
9
10
class Application extends BaseApplication
11
{
12
13
14
    /**
15
     * Register all of the base service providers.
16
     *
17
     * @return void
18
     */
19
    protected function registerBaseServiceProviders()
20
    {
21
        $this->register(new EventServiceProvider($this));
22
        $this->register(new ExpendableRoutingServiceProvider($this));
23
    }
24
25
26
    /**
27
     * Override default application storage path.
28
     *
29
     * @return mixed
30
     */
31
    public function storagePath()
32
    {
33
        $path = env('STORAGE_PATH', $this->basePath . DIRECTORY_SEPARATOR . 'storage');
34
35
        return $this->storagePath ?: $path;
36
    }
37
}