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

SandboxTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setSandbox() 0 6 1
A isSandbox() 0 4 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