Passed
Push — feature/code_improvement ( ee2f22...15c17b )
by Thierry
03:25 queued 42s
created

Message   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 31
c 0
b 0
f 0
rs 10
wmc 2
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setReturn() 0 4 1
A getReturn() 0 4 1
1
<?php
2
3
/**
4
 * Message.php - Trait for alert messages.
5
 *
6
 * @package jaxon-dialogs
0 ignored issues
show
Coding Style introduced by
Package name "jaxon-dialogs" is not valid; consider "Jaxondialogs" instead
Loading history...
7
 * @author Thierry Feuzeu <[email protected]>
8
 * @copyright 2016 Thierry Feuzeu <[email protected]>
9
 * @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
10
 * @link https://github.com/jaxon-php/jaxon-core
11
 */
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...
12
13
namespace Jaxon\Features\Dialogs;
14
15
trait Message
0 ignored issues
show
Coding Style introduced by
Missing doc comment for trait Message
Loading history...
16
{
17
    /**
18
     *
19
     *
20
     * @var boolean
21
     */
22
    private $bReturn;
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line(s) before first member var; 0 found
Loading history...
23
24
    /**
25
     * Set the library to return the javascript code or run it in the browser.
26
     *
27
     * @param boolean             $bReturn              Whether to return the code
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter type; 13 found
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter name; 14 found
Loading history...
28
     *
29
     * @return void
30
     */
31
    public function setReturn($bReturn)
32
    {
33
        $this->bReturn = $bReturn;
34
    }
35
36
    /**
37
     * Check if the library should return the js code or run it in the browser.
38
     *
39
     * @return boolean
40
     */
41
    public function getReturn()
42
    {
43
        return $this->bReturn;
44
    }
45
}
46