Completed
Branch 2.x (59be6b)
by Julián
11:20
created

SandboxTrait::setSandbox()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/*
4
 * Unified push notification services abstraction (http://github.com/juliangut/tify).
5
 *
6
 * @license BSD-3-Clause
7
 * @link https://github.com/juliangut/tify
8
 * @author Julián Gutiérrez <[email protected]>
9
 */
10
11
namespace Jgut\Tify\Adapter\Traits;
12
13
/**
14
 * Sandbox aware trait.
15
 */
16
trait SandboxTrait
17
{
18
    /**
19
     * Sandbox environment.
20
     *
21
     * @var bool
22
     */
23
    protected $sandbox;
24
25
    /**
26
     * {@inheritdoc}
27
     *
28
     * @return $this
29
     */
30
    public function setSandbox($sandbox = true)
31
    {
32
        $this->sandbox = (bool) $sandbox;
33
34
        return $this;
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    public function isSandbox()
41
    {
42
        return $this->sandbox;
43
    }
44
}
45