| Total Complexity | 3 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 62.5% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | trait RouteAwareTrait |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @ORM\OneToMany(targetEntity="Silverback\ApiComponentBundle\Entity\Route\Route", mappedBy="content", cascade={"persist"}) |
||
| 13 | * @Groups({"layout", "content", "component"}) |
||
| 14 | * @var Collection|Route[] |
||
| 15 | */ |
||
| 16 | protected $routes; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param Route $route |
||
| 20 | * @return RouteAwareInterface|RouteAwareTrait |
||
| 21 | */ |
||
| 22 | 1 | public function addRoute(Route $route) |
|
| 23 | { |
||
| 24 | 1 | $this->routes->add($route); |
|
| 25 | 1 | return $this; |
|
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param Route $route |
||
| 30 | * @return RouteAwareInterface|RouteAwareTrait |
||
| 31 | */ |
||
| 32 | public function removeRoute(Route $route) |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return Collection|Route[] |
||
| 40 | */ |
||
| 41 | 1 | public function getRoutes(): Collection |
|
| 44 | } |
||
| 45 | } |
||
| 46 |