Passed
Push — main ( ee6fb2...96b9cc )
by Thierry
05:15
created

CssCode::files()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * CssCode.php
5
 *
6
 * The CSS codes generated by a Jaxon plugin.
7
 *
8
 * @package jaxon-core
9
 * @author Thierry Feuzeu <[email protected]>
10
 * @copyright 2025 Thierry Feuzeu <[email protected]>
11
 * @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
12
 * @link https://github.com/jaxon-php/jaxon-core
13
 */
14
15
namespace Jaxon\Plugin;
16
17
class CssCode
18
{
19
    /**
20
     * @param string $sCode
21
     * @param array $aUrls
22
     */
23
    public function __construct(protected string $sCode = '', protected array $aUrls = [])
24
    {}
25
26
    /**
27
     * Get the CSS files to include into the page
28
     *
29
     * Each entry can be a string or an array with "uri" and "options".
30
     *
31
     * @return array
32
     */
33
    public function urls(): array
34
    {
35
        return $this->aUrls;
36
    }
37
38
    /**
39
     * Get the CSS code to include into the page
40
     *
41
     * The code must NOT be enclosed in HTML tags.
42
     *
43
     * @return string
44
     */
45
    public function code(): string
46
    {
47
        return $this->sCode;
48
    }
49
}
50