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

GetEnvironmentFile   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 10 2
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