Completed
Push — master ( e32bbf...e24a9d )
by Vladimir
02:16
created

FilesystemLoader   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __callStatic() 0 9 2
1
<?php
2
3
/**
4
 * @copyright 2017 Vladimir Jimenez
5
 * @license   https://github.com/allejo/stakx/blob/master/LICENSE.md MIT
6
 */
7
8
namespace allejo\stakx\Filesystem;
9
10
use allejo\stakx\System\Filesystem;
11
12
/**
13
 * @method static string absolutePath(string ...$pathFragments) Build an absolute file or directory path separated by the OS specific directory separator.
14
 * @method static FilesystemPath path(string $path) Build a cross-platform ready filesystem path.
15
 */
16
abstract class FilesystemLoader
17
{
18
    private static $fs;
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $fs. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
19
20
    public static function __callStatic($name, $arguments)
21
    {
22
        if (self::$fs === null)
23
        {
24
            self::$fs = new Filesystem();
25
        }
26
27
        return call_user_func_array([self::$fs, $name], $arguments);
28
    }
29
}
30