Completed
Push — master ( fb9109...c0d92b )
by Mahmoud
03:27
created

PublicApi::getJsonFilePath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace App\Containers\Documentation\Objects;
4
5
use App\Containers\Documentation\Contracts\ApiTypeInterface;
6
7
/**
8
 * Class PublicApi.
9
 *
10
 * @author Mahmoud Zalt <[email protected]>
11
 */
12
class PublicApi implements ApiTypeInterface
13
{
14
15
    CONST TYPE = 'public';
16
17
    /**
18
     * @var  string
19
     */
20
    protected $url = 'api/documentation';
21
22
    /**
23
     * Where to generate the new documentation.
24
     *
25
     * @return  string
26
     */
27
    public function getDocumentationPath()
28
    {
29
        return 'public/' . $this->url;
30
    }
31
32
    /**
33
     * @return  string
34
     */
35
    public function getJsonFilePath()
36
    {
37
        return "app/Containers/Documentation/ApiDocJs/{$this->getType()}";
38
    }
39
40
    /**
41
     * @return  string
42
     */
43
    public function getType()
44
    {
45
        return self::TYPE;
46
    }
47
48
    /**
49
     * @return  string
50
     */
51
    public function getUrl()
52
    {
53
        return $this->url;
54
    }
55
56
}
57