@@ -137,6 +137,7 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | /** |
| 139 | 139 | * @throws HostedDomainException If the domain does not match the configured domain. |
| 140 | + * @param string|null $hostedDomain |
|
| 140 | 141 | */ |
| 141 | 142 | protected function assertMatchingDomains($hostedDomain) |
| 142 | 143 | { |
@@ -161,7 +162,7 @@ discard block |
||
| 161 | 162 | } |
| 162 | 163 | |
| 163 | 164 | /** |
| 164 | - * @return bool Whether user-originating domain equals or matches $reference. |
|
| 165 | + * @return boolean|null Whether user-originating domain equals or matches $reference. |
|
| 165 | 166 | */ |
| 166 | 167 | protected function assertMatchingDomain($reference, $hostedDomain) |
| 167 | 168 | { |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | $domains = array_filter(explode(',', $this->hostedDomain)); |
| 149 | - if (! $domains) { |
|
| 149 | + if (!$domains) { |
|
| 150 | 150 | // No hosted domains configured. |
| 151 | 151 | return; |
| 152 | 152 | } |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | return true; |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | - if (self::isDomainExpression($reference) && @preg_match('/' . $reference . '/', $hostedDomain)) { |
|
| 178 | + if (self::isDomainExpression($reference) && @preg_match('/'.$reference.'/', $hostedDomain)) { |
|
| 179 | 179 | // Hosted domain is correct. |
| 180 | 180 | return true; |
| 181 | 181 | } |