Skip to content

Commit 20e7c5a

Browse files
committed
Improve the typing of the ApplicationHandler
1 parent ae60635 commit 20e7c5a

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@
2626
final class ApplicationHandler extends SingletonFactory
2727
{
2828
/**
29-
* application cache
30-
* @var mixed[][]
29+
* @var array{
30+
* abbreviation: array<string, int>,
31+
* application: array<int, Application>,
32+
* }
3133
*/
32-
protected $cache;
34+
private array $cache;
3335

3436
/**
35-
* list of page URLs
3637
* @var string[]
3738
*/
38-
protected array $pageURLs = [];
39+
private array $pageURLs;
3940

4041
/**
4142
* Initializes cache.
@@ -185,7 +186,7 @@ public function getAbbreviations(): array
185186
*/
186187
public function isInternalURL(string $url): bool
187188
{
188-
if (empty($this->pageURLs)) {
189+
if (!isset($this->pageURLs)) {
189190
$internalHostnames = ArrayUtil::trim(\explode("\n", StringUtil::unifyNewlines(\INTERNAL_HOSTNAMES)));
190191

191192
$this->pageURLs = \array_unique([
@@ -219,9 +220,7 @@ public function isMultiDomainSetup(): bool
219220
* @since 5.2
220221
* @deprecated 5.5 - This function is a noop. The 'active' status is determined live.
221222
*/
222-
public function rebuildActiveApplication(): void
223-
{
224-
}
223+
public function rebuildActiveApplication(): void {}
225224

226225
/**
227226
* @since 6.0
@@ -263,7 +262,7 @@ public static function insertRealDatabaseTableNames(string $string, bool $skipCa
263262
}
264263

265264
if ($skipCache) {
266-
$sql = "SELECT package
265+
$sql = "SELECT package
267266
FROM wcf" . WCF_N . "_package
268267
WHERE isApplication = ?";
269268
$statement = WCF::getDB()->prepareUnmanaged($sql);

0 commit comments

Comments
 (0)