Completed
Push — master ( f8571a...f0770d )
by Marko
04:14
created

Asset   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 16
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A mixin() 0 4 1
1
<?php
2
/** @formatter:off
3
 * ******************************************************************
4
 * Created by   Marko Kungla on Jun 20, 2016 - 9:08:14 PM
5
 * Contact      [email protected]
6
 * @copyright   2016 Marko Kungla - https://github.com/mkungla
7
 * @license     The MIT License (MIT)
8
 * 
9
 * @category       AframeVR
10
 * @package        aframe-php
11
 * 
12
 * Lang         PHP (php version >= 7)
13
 * Encoding     UTF-8
14
 * File         Assets.php
15
 * Code format  PSR-2 and 12
16
 * @link        https://github.com/mkungla/aframe-php
17
 ^ @issues      https://github.com/mkungla/aframe-php/issues
18
 * ********************************************************************
19
 * Contributors:
20
 * @author Marko Kungla <[email protected]>
21
 * ********************************************************************
22
 * Comments:
23
 * @formatter:on */
24
namespace AframeVR\Core;
25
26
use \AframeVR\Interfaces\{
27
    AssetsInterface,
28
    MixinInterface
29
};
30
use \AframeVR\Core\Mixin;
31
32
final class Asset implements AssetsInterface
33
{
34
35
    protected $mixins;
36
37
    /**
38
     * mixin
39
     *
40
     * @param string $name            
41
     * @return \AframeVR\Interfaces\MixinInterface
42
     */
43 1
    public function mixin(string $name = 'untitled'): MixinInterface
44
    {
45 1
        return $this->mixins[$name] ?? $this->mixins[$name] = new Mixin();
46
    }
47
}
48