Passed
Push — develop ( 0bfd92...f25835 )
by Mario
03:25
created

OAuths::getOAuths()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace AppBundle\Entity\Attribute\Accessor;
4
5
use AppBundle\Entity\OAuth;
6
7
/**
8
 * Trait OAuths
9
 */
10
trait OAuths
11
{
12
    /**
13
     * Add oauth
14
     *
15
     * @param \AppBundle\Entity\OAuth $oauth
16
     * @return object
17
     */
18
    public function addOAuth(OAuth $oauth)
19
    {
20
        if (!$this->oauths->contains($oauth)) {
21
            $this->oauths->add($oauth);
22
        }
23
24
        return $this;
25
    }
26
27
    /**
28
     * Remove oauths
29
     *
30
     * @param \AppBundle\Entity\OAuth $oauth
31
     * @return object
32
     */
33
    public function removeScenario(OAuth $oauth)
34
    {
35
        if ($this->oauths->contains($oauth)) {
36
            $this->oauths->removeElement($oauth);
37
        }
38
39
        return $this;
40
    }
41
42
    /**
43
     * Get oauths
44
     *
45
     * @return \Doctrine\Common\Collections\ArrayCollection
46
     */
47
    public function getOAuths()
48
    {
49
        return $this->oauths;
50
    }
51
}
52