Assets::__call()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 1
b 0
f 1
1
<?php
2
3
namespace ByTIC\Assets;
4
5
use ByTIC\Assets\Assets\AssetCollection;
6
use Nip\Utility\Traits\SingletonTrait;
7
8
/**
9
 * Class Assets
10
 * @package ByTIC\Assets
11
 *
12
 * @method AssetCollection styles()
13
 */
14
class Assets
15
{
16
    use Assets\Traits\HasEntriesTrait;
17
    use SingletonTrait;
18
19
    /**
20
     * Magic Method for calling methods on the default container.
21
     *
22
     * <code>
23
     *     // Call the "styles" method on the default container
24
     *     echo Orchestra\Asset::styles();
25
     *
26
     *     // Call the "add" method on the default container
27
     *     Orchestra\Asset::add('jquery', 'js/jquery.js');
28
     * </code>
29
     *
30
     * @return mixed
31
     */
32
    public function __call(string $method, array $parameters)
33
    {
34
        return call_user_func_array([static::instance()->entry(), $method], $parameters);
35
    }
36
}
37