Completed
Push — master ( 71f3ca...10d1fd )
by Thierry
01:44
created

Alert   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
rs 10
c 0
b 0
f 0
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
 * Alert.php - Interface for alert messages.
5
 *
6
 * @package jaxon-dialogs
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
 */
12
13
namespace Jaxon\Dialog\Traits;
14
15
trait Alert
16
{
17
    /**
18
     *
19
     *
20
     * @var boolean
21
     */
22
    private $bReturn;
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
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