| Conditions | 4 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 77 | public function getSite() |
||
| 78 | { |
||
| 79 | if ($this->site === null) { |
||
| 80 | $site = $this->resolveSite(); |
||
| 81 | $this->setSite($site); |
||
| 82 | return $site; |
||
| 83 | } |
||
| 84 | |||
| 85 | $siteId = $this->siteId; |
||
| 86 | if ($siteId !== null && |
||
| 87 | $siteId !== $this->site->id |
||
| 88 | ) { |
||
| 89 | $this->site = null; |
||
| 90 | return $this->getSite(); |
||
| 91 | } |
||
| 92 | |||
| 93 | return $this->site; |
||
| 94 | } |
||
| 95 | |||
| 120 |