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

OAuths   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 5

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getOAuths() 0 3 1
A removeScenario() 0 7 2
A addOAuth() 0 7 2
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