helpers.php ➔ guessSrcDirectory()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
nc 3
nop 1
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @param string $cwd
5
 * @return string
6
 */
7
function guessSrcDirectory(string $cwd): string
8
{
9
    if (file_exists($cwd . '/app')) {
10
        return 'app';
11
    }
12
13
    if (file_exists($cwd . '/src')) {
14
        return 'src';
15
    }
16
17
    return '.';
18
}
19