Passed
Push — main ( 02d0e2...a48ca0 )
by Thierry
12:44 queued 11:20
created

Tingle   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 45
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getCss() 0 3 1
A getUri() 0 3 1
A getJs() 0 3 1
A getName() 0 3 1
A getReadyScript() 0 3 1
1
<?php
2
3
/**
4
 * TingleLibrary.php
5
 *
6
 * Adapter for the Tingle library.
7
 *
8
 * @package jaxon-dialogs
9
 * @author Thierry Feuzeu <[email protected]>
10
 * @copyright 2016 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-dialogs
13
 */
14
15
namespace Jaxon\Dialogs\Dialog\Library;
16
17
use Jaxon\Dialogs\Dialog\AbstractLibrary;
18
use Jaxon\App\Dialog\Library\ModalInterface;
19
20
class Tingle extends AbstractLibrary implements ModalInterface
21
{
22
    /**
23
     * @const The library name
24
     */
25
    const NAME = 'tingle';
26
27
    /**
28
     * @inheritDoc
29
     */
30
    public function getName(): string
31
    {
32
        return self::NAME;
33
    }
34
35
    /**
36
     * @inheritDoc
37
     */
38
    public function getUri(): string
39
    {
40
        return 'https://cdn.jsdelivr.net/npm/[email protected]/dist';
41
    }
42
43
    /**
44
     * @inheritDoc
45
     */
46
    public function getJs(): string
47
    {
48
        return $this->helper()->getJsCode('tingle.min.js');
49
    }
50
51
    /**
52
     * @inheritDoc
53
     */
54
    public function getCss(): string
55
    {
56
        return $this->helper()->getCssCode('tingle.min.css');
57
    }
58
59
    /**
60
     * @inheritDoc
61
     */
62
    public function getReadyScript(): string
63
    {
64
        return $this->helper()->render('tingle.js');
65
    }
66
}
67