Completed
Push — master ( a6c8f9...b97be3 )
by Vladimir
03:52 queued 19s
created

CollectableItemTrait::setNamespace()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
/**
4
 * @copyright 2017 Vladimir Jimenez
5
 * @license   https://github.com/allejo/stakx/blob/master/LICENSE.md MIT
6
 */
7
8
namespace allejo\stakx\Document;
9
10
/**
11
 * This interface defines what an object needs in order for a dynamic PageView to treat it as an item of a group of
12
 * files.
13
 */
14
trait CollectableItemTrait
15
{
16
    /** @var string */
17
    protected $namespace;
18
19
    /** @var DynamicPageView */
20
    protected $pageView;
21
22
    /**
23
     * {@inheritdoc}
24
     */
25 23
    public function getNamespace()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
26
    {
27 23
        return $this->namespace;
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33 39
    public function setNamespace($namespace)
34
    {
35 39
        $this->namespace = $namespace;
36 39
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41
    public function &getParentPageView()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
42
    {
43
        return $this->pageView;
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function getJailedPageView()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
50
    {
51
        return $this->pageView->createJail();
52
    }
53
54
    /**
55
     * {@inheritdoc}
56
     */
57 5
    public function setParentPageView(DynamicPageView &$pageView)
58
    {
59 5
        $this->pageView = &$pageView;
60 5
    }
61
}
62