ForgePublishRCFile   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A path() 0 4 1
A exists() 0 4 1
1
<?php
2
3
namespace Acacha\ForgePublish;
4
5
use Illuminate\Support\Facades\File;
6
7
/**
8
 * Class ForgePublishRCFile.
9
 *
10
 * @package Acacha\Llum
11
 */
12
class ForgePublishRCFile
13
{
14
15
    /**
16
     * Relative path to llumrc file.
17
     *
18
     * @var string
19
     */
20
    const RELATIVE_FILE_PATH = "/.forgepublishrc";
21
22
    /**
23
     * Get real path (form user home)
24
     *
25
     * @return string
26
     */
27
    public static function path()
28
    {
29
        return getenv("HOME") . self::RELATIVE_FILE_PATH;
30
    }
31
32
    /**
33
     * Get real path (form user home)
34
     *
35
     * @return string
36
     */
37
    public static function exists()
38
    {
39
        return File::exists(self::path());
40
    }
41
}
42