Completed
Pull Request — master (#4330)
by xiaohui
11:24
created

Asset   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 35
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A inPjax() 0 4 1
A __toString() 0 4 1
1
<?php
2
3
namespace Encore\Admin\Layout;
4
5
class Asset
6
{
7
    protected $src;
8
9
    protected $in_pjax;
10
11
    /**
12
     * @param string $src
13
     */
14
    public function __construct(string $src, bool $in_pjax = false)
15
    {
16
        $this->src = $src;
17
        $this->in_pjax = $in_pjax;
18
    }
19
20
    /**
21
     * Is in pjax.
22
     *
23
     * @return bool
24
     */
25
    public function inPjax()
26
    {
27
        return $this->in_pjax;
28
    }
29
30
    /**
31
     * To string.
32
     *
33
     * @return string
34
     */
35
    public function __toString()
36
    {
37
        return $this->src;
38
    }
39
}
40