GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — new (#881)
by
unknown
08:38
created

ElementPlacementTrait::setTag()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace SleepingOwl\Admin\Traits;
4
5
trait ElementPlacementTrait
6
{
7
    /**
8
     * @return string
9
     */
10
    public function getTag()
11
    {
12
        return $this->tag;
13
    }
14
15
    /**
16
     * @param string $tag
17
     *
18
     * @return $this
19
     */
20
    public function setTag($tag)
21
    {
22
        $this->tag = $tag;
0 ignored issues
show
Bug Best Practice introduced by
The property tag does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
23
24
        return $this;
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getPlacement()
31
    {
32
        return $this->placement;
33
    }
34
35
    /**
36
     * @param string $placement
37
     *
38
     * @return $this
39
     */
40
    public function setPlacement($placement)
41
    {
42
        $this->setTag($placement == 'table.header' ? 'thead' : 'tfoot');
43
44
        return $this;
45
    }
46
47
    /**
48
     * @deprecated use getPlacement()
49
     * @return string
50
     */
51
    public function getPosition()
52
    {
53
        return $this->getPlacement();
54
    }
55
56
    /**
57
     * @deprecated use setPlacement(string $placement)
58
     * @param string $position
59
     *
60
     * @return $this
61
     */
62
    public function setPosition($position)
63
    {
64
        return $this->setPlacement($position);
65
    }
66
}
67