Alertify   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 43
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getUri() 0 3 1
A getName() 0 3 1
A getCss() 0 3 1
1
<?php
2
3
/**
4
 * Alertify.php
5
 *
6
 * Adapter for the Alertify 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\AlertInterface;
19
use Jaxon\App\Dialog\Library\ConfirmInterface;
20
use Jaxon\App\Dialog\Library\ModalInterface;
21
22
class Alertify extends AbstractLibrary implements ModalInterface, AlertInterface, ConfirmInterface
23
{
24
    /**
25
     * @const The library name
26
     */
27
    const NAME = 'alertify';
28
29
    /**
30
     * The css files
31
     *
32
     * @var array
33
     */
34
    protected $aCssFiles = ['css/alertify.min.css', 'css/themes/default.min.css'];
35
36
    /**
37
     * The js files
38
     *
39
     * @var array
40
     */
41
    protected $aJsFiles = ['alertify.min.js'];
42
43
    /**
44
     * @inheritDoc
45
     */
46
    public function getName(): string
47
    {
48
        return self::NAME;
49
    }
50
51
    /**
52
     * @inheritDoc
53
     */
54
    public function getUri(): string
55
    {
56
        return 'https://cdn.jsdelivr.net/npm/[email protected]/build';
57
    }
58
59
    /**
60
     * @inheritDoc
61
     */
62
    public function getCss(): string
63
    {
64
        return parent::getCss() . '
65
<style>
66
    .ajs-footer .ajs-buttons .btn {
67
        margin-right: 10px;
68
    }
69
</style>
70
';
71
    }
72
}
73