Passed
Push — master ( 6251ab...a07882 )
by Thierry
01:53
created

MessageTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getReturn() 0 3 1
A setReturn() 0 3 1
1
<?php
2
3
/**
4
 * MessageTrait.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
Missing @category tag in file comment
Loading history...
Coding Style introduced by
PHP version not specified
Loading history...
12
13
namespace Jaxon\Ui\Dialogs;
14
15
trait MessageTrait
0 ignored issues
show
Coding Style introduced by
Missing doc comment for trait MessageTrait
Loading history...
16
{
17
    /**
18
     *
19
     *
20
     * @var bool
0 ignored issues
show
Bug introduced by
Expected "boolean" but found "bool" for @var tag in member variable comment
Loading history...
21
     */
22
    private $bReturn = false;
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 bool $bReturn    Whether to return the code
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter name; 4 found
Loading history...
28
     *
29
     * @return void
30
     */
31
    public function setReturn(bool $bReturn)
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
32
    {
33
        $this->bReturn = $bReturn;
34
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
35
36
    /**
37
     * Check if the library should return the js code or run it in the browser.
38
     *
39
     * @return bool
40
     */
41
    public function getReturn(): bool
42
    {
43
        return $this->bReturn;
44
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
45
}
46