Passed
Push — develop ( 7d58c8...c9bd18 )
by Nikolay
05:59
created

appPath()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MikoPBX\Common\Config;
6
7
use function function_exists;
8
9
if (true !== function_exists('MikoPBX\Common\Config\appPath')) {
10
    /**
11
     * Get the application path.
12
     *
13
     * @param string $path
14
     *
15
     * @return string
16
     */
17
    function appPath(string $path = ''): string
18
    {
19
        return dirname(__DIR__,3) . ($path ? DIRECTORY_SEPARATOR . $path : $path);
20
    }
21
}
22