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

Asset::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
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