WindowsFileAppenderTrait::_joinPaths()   A
last analyzed

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 2
1
<?php
2
namespace Nubs\Which\PathBuilder;
3
4
/**
5
 * Appends filenames to an array of paths.
6
 */
7
trait WindowsFileAppenderTrait
8
{
9
    use FileAppenderTrait;
10
11
    /**
12
     * Joins two path segments together.
13
     *
14
     * @param string $start The starting segment.
15
     * @param string $end The ending segment.
16
     * @return string The joined segments.
17
     */
18
    protected function _joinPaths($start, $end)
19
    {
20
        return "{$start}\\{$end}";
21
    }
22
23
    /**
24
     * Checks to see if a path is just a single atom (no directory).
25
     *
26
     * @param string $path The path to check.
27
     * @return boolean True if it's an atom, false otherwise.
28
     */
29
    protected function _isAtom($path)
30
    {
31
        return strpos($path, '\\') === false;
32
    }
33
}
34