Skip to content

Commit 4120235

Browse files
authored
Merge pull request #6611 from WoltLab/63-dbo-properties
Update / unify property documentation of database objects
2 parents b948db5 + 451fba3 commit 4120235

173 files changed

Lines changed: 1004 additions & 1273 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "woltlab/wcf",
33
"type": "project",
44
"require-dev": {
5-
"phpstan/phpstan": "^2.1"
5+
"phpstan/phpstan": "^2.1.40"
66
},
77
"require": {}
88
}

composer.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wcfsetup/install.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php // @codingStandardsIgnoreFile
2+
23
/**
34
* This script tries to find the temp folder and unzip all setup files into.
45
*
@@ -532,7 +533,6 @@ function printException($e)
532533
throw new ErrorException($message, 0, $severity, $file, $line);
533534
}, E_ALL);
534535

535-
/** @noinspection PhpMultipleClassesDeclarationsInOneFile */
536536
/**
537537
* A SystemException is thrown when an unexpected error occurs.
538538
*
@@ -573,9 +573,7 @@ public function getDescription()
573573
* Prints this exception.
574574
* This method is called by WCF::handleException().
575575
*/
576-
public function show()
577-
{
578-
}
576+
public function show() {}
579577
}
580578

581579
/**
@@ -633,7 +631,6 @@ function wcfDebug()
633631
exit;
634632
}
635633

636-
/** @noinspection PhpMultipleClassesDeclarationsInOneFile */
637634
/**
638635
* BasicFileUtil contains file-related functions.
639636
*
@@ -760,7 +757,6 @@ public static function makePath($path): bool
760757
}
761758
}
762759

763-
/** @noinspection PhpMultipleClassesDeclarationsInOneFile */
764760
/**
765761
* Opens tar or tar.gz archives.
766762
*
@@ -1124,7 +1120,6 @@ public function isZipped()
11241120
}
11251121
}
11261122

1127-
/** @noinspection PhpMultipleClassesDeclarationsInOneFile */
11281123
/**
11291124
* The File class handles all file operations.
11301125
*
@@ -1185,15 +1180,13 @@ public function __call($function, $arguments)
11851180
}
11861181
}
11871182

1188-
/** @noinspection PhpMultipleClassesDeclarationsInOneFile */
11891183
/**
11901184
* The File class handles all file operations on a zipped file.
11911185
*
11921186
* @author Marcel Werk
11931187
*/
11941188
final class GZipFile extends File
11951189
{
1196-
/** @noinspection PhpMissingParentConstructorInspection */
11971190
/**
11981191
* Opens a gzip file.
11991192
*

wcfsetup/install/files/acp/database/update_com.woltlab.wcf_6.3_step1.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,20 @@
99
*/
1010

1111
use wcf\system\database\table\column\DefaultFalseBooleanDatabaseTableColumn;
12+
use wcf\system\database\table\column\NotNullVarchar255DatabaseTableColumn;
13+
use wcf\system\database\table\column\SmallintDatabaseTableColumn;
1214
use wcf\system\database\table\PartialDatabaseTable;
1315

1416
return [
1517
PartialDatabaseTable::create('wcf1_label_group')
1618
->columns([
1719
DefaultFalseBooleanDatabaseTableColumn::create('sortAlphabetically')
1820
]),
21+
PartialDatabaseTable::create('wcf1_trophy')
22+
->columns([
23+
NotNullVarchar255DatabaseTableColumn::create('title'),
24+
SmallintDatabaseTableColumn::create('type')
25+
->notNull()
26+
->defaultValue(1),
27+
]),
1928
];

wcfsetup/install/files/lib/acp/form/UserGroupAssignmentEditForm.class.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public function readData()
7070

7171
$conditions = $this->assignment->getConditions();
7272
foreach ($conditions as $condition) {
73-
/** @noinspection PhpUndefinedMethodInspection */
7473
$this->conditions[$condition->getObjectType()->conditiongroup][$condition->objectTypeID]->getProcessor()->setData($condition);
7574
}
7675
}

wcfsetup/install/files/lib/action/AJAXInvokeAction.class.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ protected function invoke()
143143

144144
// validate accessibility
145145
$className = $this->className;
146-
/** @noinspection PhpUndefinedFieldInspection */
147146
if (!\property_exists($className, 'allowInvoke') || !\in_array($this->actionName, $className::$allowInvoke)) {
148147
throw new PermissionDeniedException();
149148
}

wcfsetup/install/files/lib/action/AJAXProxyAction.class.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ protected function sendResponse()
9999
{
100100
// add benchmark and debug data
101101
if (ENABLE_BENCHMARK) {
102-
/** @noinspection PhpUndefinedMethodInspection */
103102
$this->response['benchmark'] = [
104103
'executionTime' => WCF::getBenchmark()->getExecutionTime() . 's',
105104
'memoryUsage' => WCF::getBenchmark()->getMemoryUsage(),
@@ -109,7 +108,6 @@ protected function sendResponse()
109108
];
110109

111110
if (ENABLE_DEBUG_MODE) {
112-
/** @noinspection PhpUndefinedMethodInspection */
113111
$this->response['benchmark']['items'] = WCF::getBenchmark()->getItems();
114112
}
115113
}

wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public function execute(): ResponseInterface
3131
$processor = null;
3232
try {
3333
// post back to paypal to validate
34-
/** @noinspection PhpUnusedLocalVariableInspection */
3534
$content = '';
3635
try {
3736
$url = 'https://www.paypal.com/cgi-bin/webscr';

wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ public function __construct(array $objects, $action, array $parameters = [])
140140
throw new SystemException('invalid value of parameter objects given');
141141
}
142142

143-
/** @noinspection PhpVariableVariableInspection */
144143
$this->objectIDs[] = $object->{$indexName};
145144
} else {
146145
$this->objectIDs[] = $object;

wcfsetup/install/files/lib/data/DatabaseObject.class.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ public static function sort(&$objects, $sortBy, $sortOrder = 'ASC', $maintainInd
229229
{
230230
$sortArray = $objects2 = [];
231231
foreach ($objects as $idx => $obj) {
232-
/** @noinspection PhpVariableVariableInspection */
233232
$sortArray[$idx] = $obj->{$sortBy};
234233

235234
// array_multisort will drop index association if key is not a string

0 commit comments

Comments
 (0)