Passed
Push — master ( b34d93...aea763 )
by Thierry
03:02 queued 24s
created

AbstractDialogLibrary   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 8
eloc 11
c 1
b 0
f 0
dl 0
loc 72
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getVersion() 0 3 1
A getScript() 0 3 1
A addCommand() 0 4 1
A getReadyScript() 0 3 1
A getUri() 0 3 1
A getSubdir() 0 3 1
A getJs() 0 3 1
A getCss() 0 3 1
1
<?php
2
3
/**
4
 * AbstractDialogLibrary.php
5
 *
6
 * Base class for javascript dialog library adapters.
7
 *
8
 * @package jaxon-core
0 ignored issues
show
Coding Style introduced by
Package name "jaxon-core" is not valid; consider "Jaxoncore" instead
Loading history...
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
 */
0 ignored issues
show
Coding Style introduced by
PHP version not specified
Loading history...
Coding Style introduced by
Missing @category tag in file comment
Loading history...
14
15
namespace Jaxon\Ui\Dialog\Library;
16
17
use Jaxon\Plugin\Response\Dialog\DialogPlugin;
18
19
abstract class AbstractDialogLibrary implements DialogLibraryInterface
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class AbstractDialogLibrary
Loading history...
20
{
21
    use DialogLibraryTrait;
22
23
    /**
24
     * Add a client side plugin command to the response object
25
     *
26
     * @param array $aAttributes The attributes of the command
27
     * @param mixed $xData The data to be added to the command
0 ignored issues
show
Coding Style introduced by
Expected 7 spaces after parameter name; 1 found
Loading history...
28
     *
29
     * @return void
30
     */
31
    final public function addCommand(array $aAttributes, $xData)
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
32
    {
33
        $aAttributes['plg'] = $this->getName();
34
        $this->xResponse->addCommand($aAttributes, $xData);
35
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
36
37
    /**
38
     * @inheritDoc
39
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
40
    public function getUri(): string
41
    {
42
        return 'https://cdn.jaxon-php.org/libs';
43
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
44
45
    /**
46
     * @inheritDoc
47
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
48
    public function getSubdir(): string
49
    {
50
        return '';
51
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
52
53
    /**
54
     * @inheritDoc
55
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
56
    public function getVersion(): string
57
    {
58
        return '';
59
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
60
61
    /**
62
     * @inheritDoc
63
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
64
    public function getJs(): string
65
    {
66
        return '';
67
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
68
69
    /**
70
     * @inheritDoc
71
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
72
    public function getCss(): string
73
    {
74
        return '';
75
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
76
77
    /**
78
     * @inheritDoc
79
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
80
    public function getScript(): string
81
    {
82
        return '';
83
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
84
85
    /**
86
     * @inheritDoc
87
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
88
    public function getReadyScript(): string
89
    {
90
        return '';
91
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
92
}
93