Passed
Pull Request — master (#48)
by Arman
03:56
created

Asset   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
c 1
b 0
f 0
dl 0
loc 41
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getPath() 0 3 1
A __construct() 0 5 1
A getPosition() 0 3 1
A getType() 0 3 1
1
<?php
2
3
/**
4
 * Quantum PHP Framework
5
 *
6
 * An open source software development framework for PHP
7
 *
8
 * @package Quantum
9
 * @author Arman Ag. <[email protected]>
10
 * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org)
11
 * @link http://quantum.softberg.org/
12
 * @since 2.6.0
13
 *
14
 */
15
16
namespace Quantum\Libraries\Asset;
17
18
/**
19
 * Class AssetManager
20
 * @package Quantum\Libraries\Asset
21
 */
22
class Asset
23
{
24
    const CSS = 1;
25
26
    const JS = 2;
27
28
    /**
29
     * @var int
30
     */
31
    private $type;
32
33
    /**
34
     * @var string
35
     */
36
    private $path;
37
38
    /**
39
     * @var int
40
     */
41
    private $position;
42
43
    public function __construct(int $type, string $path, int $position = -1)
44
    {
45
        $this->type = $type;
46
        $this->path = $path;
47
        $this->position = $position;
48
    }
49
50
    public function getType(): int
51
    {
52
        return $this->type;
53
    }
54
55
    public function getPath(): string
56
    {
57
        return $this->path;
58
    }
59
60
    public function getPosition(): ?int
61
    {
62
        return $this->position;
63
    }
64
65
}