Completed
Push — master ( 98a062...441031 )
by Ryan
10:10
created

GetEnvironmentFile::handle()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
nc 2
nop 1
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
1
<?php namespace Anomaly\Streams\Platform\Application\Command;
2
3
use Anomaly\Streams\Platform\Application\Application;
4
5
/**
6
 * Class GetEnvironmentFile
7
 *
8
 * @link   http://pyrocms.com/
9
 * @author PyroCMS, Inc. <[email protected]>
10
 * @author Ryan Thompson <[email protected]>
11
 */
12
class GetEnvironmentFile
13
{
14
15
    /**
16
     * Handle the command.
17
     *
18
     * @param Application $application
19
     * @return string
20
     */
21
    public function handle(Application $application)
22
    {
23
        $file = $application->getResourcesPath('.env');
24
25
        if (!file_exists($file)) {
26
            return base_path('.env');
27
        }
28
29
        return $file;
30
    }
31
}
32