| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | trait MessageTrait |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * |
||
| 19 | * |
||
| 20 | * @var bool |
||
| 21 | */ |
||
| 22 | private $bReturn = false; |
||
| 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 |
||
| 28 | * |
||
| 29 | * @return void |
||
| 30 | */ |
||
| 31 | public function setReturn(bool $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 bool |
||
| 40 | */ |
||
| 41 | public function getReturn(): bool |
||
| 44 | } |
||
| 45 | } |
||
| 46 |