Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "woltlab/wcf",
"type": "project",
"require-dev": {
"phpstan/phpstan": "^2.1"
"phpstan/phpstan": "^2.1.40"
},
"require": {}
}
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 2 additions & 9 deletions wcfsetup/install.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php // @codingStandardsIgnoreFile

/**
* This script tries to find the temp folder and unzip all setup files into.
*
Expand Down Expand Up @@ -532,7 +533,6 @@ function printException($e)
throw new ErrorException($message, 0, $severity, $file, $line);
}, E_ALL);

/** @noinspection PhpMultipleClassesDeclarationsInOneFile */
/**
* A SystemException is thrown when an unexpected error occurs.
*
Expand Down Expand Up @@ -573,9 +573,7 @@ public function getDescription()
* Prints this exception.
* This method is called by WCF::handleException().
*/
public function show()
{
}
public function show() {}
}

/**
Expand Down Expand Up @@ -633,7 +631,6 @@ function wcfDebug()
exit;
}

/** @noinspection PhpMultipleClassesDeclarationsInOneFile */
/**
* BasicFileUtil contains file-related functions.
*
Expand Down Expand Up @@ -760,7 +757,6 @@ public static function makePath($path): bool
}
}

/** @noinspection PhpMultipleClassesDeclarationsInOneFile */
/**
* Opens tar or tar.gz archives.
*
Expand Down Expand Up @@ -1124,7 +1120,6 @@ public function isZipped()
}
}

/** @noinspection PhpMultipleClassesDeclarationsInOneFile */
/**
* The File class handles all file operations.
*
Expand Down Expand Up @@ -1185,15 +1180,13 @@ public function __call($function, $arguments)
}
}

/** @noinspection PhpMultipleClassesDeclarationsInOneFile */
/**
* The File class handles all file operations on a zipped file.
*
* @author Marcel Werk
*/
final class GZipFile extends File
{
/** @noinspection PhpMissingParentConstructorInspection */
/**
* Opens a gzip file.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,20 @@
*/

use wcf\system\database\table\column\DefaultFalseBooleanDatabaseTableColumn;
use wcf\system\database\table\column\NotNullVarchar255DatabaseTableColumn;
use wcf\system\database\table\column\SmallintDatabaseTableColumn;
use wcf\system\database\table\PartialDatabaseTable;

return [
PartialDatabaseTable::create('wcf1_label_group')
->columns([
DefaultFalseBooleanDatabaseTableColumn::create('sortAlphabetically')
]),
PartialDatabaseTable::create('wcf1_trophy')
->columns([
NotNullVarchar255DatabaseTableColumn::create('title'),
SmallintDatabaseTableColumn::create('type')
->notNull()
->defaultValue(1),
]),
];
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public function readData()

$conditions = $this->assignment->getConditions();
foreach ($conditions as $condition) {
/** @noinspection PhpUndefinedMethodInspection */
$this->conditions[$condition->getObjectType()->conditiongroup][$condition->objectTypeID]->getProcessor()->setData($condition);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ protected function invoke()

// validate accessibility
$className = $this->className;
/** @noinspection PhpUndefinedFieldInspection */
if (!\property_exists($className, 'allowInvoke') || !\in_array($this->actionName, $className::$allowInvoke)) {
throw new PermissionDeniedException();
}
Expand Down
2 changes: 0 additions & 2 deletions wcfsetup/install/files/lib/action/AJAXProxyAction.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ protected function sendResponse()
{
// add benchmark and debug data
if (ENABLE_BENCHMARK) {
/** @noinspection PhpUndefinedMethodInspection */
$this->response['benchmark'] = [
'executionTime' => WCF::getBenchmark()->getExecutionTime() . 's',
'memoryUsage' => WCF::getBenchmark()->getMemoryUsage(),
Expand All @@ -109,7 +108,6 @@ protected function sendResponse()
];

if (ENABLE_DEBUG_MODE) {
/** @noinspection PhpUndefinedMethodInspection */
$this->response['benchmark']['items'] = WCF::getBenchmark()->getItems();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public function execute(): ResponseInterface
$processor = null;
try {
// post back to paypal to validate
/** @noinspection PhpUnusedLocalVariableInspection */
$content = '';
try {
$url = 'https://www.paypal.com/cgi-bin/webscr';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ public function __construct(array $objects, $action, array $parameters = [])
throw new SystemException('invalid value of parameter objects given');
}

/** @noinspection PhpVariableVariableInspection */
$this->objectIDs[] = $object->{$indexName};
} else {
$this->objectIDs[] = $object;
Expand Down
1 change: 0 additions & 1 deletion wcfsetup/install/files/lib/data/DatabaseObject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ public static function sort(&$objects, $sortBy, $sortOrder = 'ASC', $maintainInd
{
$sortArray = $objects2 = [];
foreach ($objects as $idx => $obj) {
/** @noinspection PhpVariableVariableInspection */
$sortArray[$idx] = $obj->{$sortBy};

// array_multisort will drop index association if key is not a string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public function getCategories()

if (!empty($this->categoryIDs)) {
foreach ($this->categoryIDs as $categoryID) {
/** @noinspection PhpUndefinedMethodInspection */
$this->categories[$categoryID] = $className::getCategory($categoryID);
}
} else {
Expand All @@ -84,7 +83,6 @@ public function getCategories()
$statement = WCF::getDB()->prepare($sql);
$statement->execute([$this->getObjectID()]);
while ($categoryID = $statement->fetchColumn()) {
/** @noinspection PhpUndefinedMethodInspection */
$this->categories[$categoryID] = $className::getCategory($categoryID);
}
}
Expand Down
10 changes: 5 additions & 5 deletions wcfsetup/install/files/lib/data/acl/option/ACLOption.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
* @copyright 2001-2019 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*
* @property-read int $optionID unique id of the acl option
* @property-read int $packageID id of the package which delivers the acl option
* @property-read int $objectTypeID id of the `com.woltlab.wcf.acl` object type
* @property-read string $optionName name and textual identifier of the acl option
* @property-read string $categoryName name of the acl option category the option belongs to
* @property-read int $optionID unique id of the acl option
* @property-read int $packageID id of the package which delivers the acl option
* @property-read int $objectTypeID id of the `com.woltlab.wcf.acl` object type
* @property-read string $optionName name and textual identifier of the acl option
* @property-read string $categoryName name of the acl option category the option belongs to
*/
class ACLOption extends DatabaseObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* @copyright 2001-2019 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*
* @property-read int $categoryID unique id of the acl option category
* @property-read int $packageID id of the package which delivers the acl option category
* @property-read int $objectTypeID id of the `com.woltlab.wcf.acl` object type
* @property-read string $categoryName name and textual identifier of the acl option category
* @property-read int $categoryID unique id of the acl option category
* @property-read int $packageID id of the package which delivers the acl option category
* @property-read int $objectTypeID id of the `com.woltlab.wcf.acl` object type
* @property-read string $categoryName name and textual identifier of the acl option category
*/
class ACLOptionCategory extends DatabaseObject {}
20 changes: 10 additions & 10 deletions wcfsetup/install/files/lib/data/acp/menu/item/ACPMenuItem.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
* @copyright 2001-2019 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*
* @property-read int $menuItemID unique id of the ACP menu item
* @property-read int $packageID id of the package which delivers the ACP menu item
* @property-read string $menuItem textual identifier of the ACP menu item
* @property-read string $parentMenuItem textual identifier of the ACP menu item's parent menu item or empty if it has no parent menu item
* @property-read string $menuItemController class name of the ACP menu item's controller used to generate menu item link
* @property-read string $menuItemLink additional part of the ACP menu item link if `$menuItemController` is set, external link or name of language item which contains the external link
* @property-read int $showOrder position of the ACP menu item in relation to its siblings
* @property-read string $permissions comma separated list of user group permissions of which the active user needs to have at least one to see the ACP menu item
* @property-read string $options comma separated list of options of which at least one needs to be enabled for the ACP menu item to be shown
* @property-read string $icon FontAwesome CSS class name for ACP menu items on the first or third level
* @property-read int $menuItemID unique id of the ACP menu item
* @property-read int $packageID id of the package which delivers the ACP menu item
* @property-read string $menuItem textual identifier of the ACP menu item
* @property-read string $parentMenuItem textual identifier of the ACP menu item's parent menu item or empty if it has no parent menu item
* @property-read string $menuItemController class name of the ACP menu item's controller used to generate menu item link
* @property-read string $menuItemLink additional part of the ACP menu item link if `$menuItemController` is set, external link or name of language item which contains the external link
* @property-read int $showOrder position of the ACP menu item in relation to its siblings
* @property-read ?string $permissions comma separated list of user group permissions of which the active user needs to have at least one to see the ACP menu item
* @property-read ?string $options comma separated list of options of which at least one needs to be enabled for the ACP menu item to be shown
* @property-read string $icon FontAwesome CSS class name for ACP menu items on the first or third level
*/
class ACPMenuItem extends DatabaseObject implements ITreeMenuItem
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
* @copyright 2001-2019 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*
* @property-read int $providerID unique id of the ACP search provider
* @property-read int $packageID id of the package which delivers the ACP search provider
* @property-read string $providerName textual identifier of the ACP search provider
* @property-read string $className class name of the `wcf\system\search\acp\IACPSearchResultProvider` implementation executing the search
* @property-read int $showOrder position of the grouped results of the ACP search provider within the result list
* @property-read int $providerID unique id of the ACP search provider
* @property-read int $packageID id of the package which delivers the ACP search provider
* @property-read string $providerName textual identifier of the ACP search provider
* @property-read string $className class name of the `wcf\system\search\acp\IACPSearchResultProvider` implementation executing the search
* @property-read int $showOrder position of the grouped results of the ACP search provider within the result list
*/
class ACPSearchProvider extends DatabaseObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
* @copyright 2001-2019 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*
* @property-read int $sessionAccessLogID unique id of the acp session access log entry
* @property-read int $sessionLogID id of the acp session log entry the access log entry belongs to
* @property-read string $ipAddress ip address of the user who has caused the acp session access log entry
* @property-read int $time timestamp at which the acp session access log entry has been created
* @property-read string $requestURI uri of the logged request
* @property-read string $requestMethod used request method (`GET`, `POST`)
* @property-read string $className name of the PHP controller class
* @property-read int $sessionAccessLogID unique id of the acp session access log entry
* @property-read int $sessionLogID id of the acp session log entry the access log entry belongs to
* @property-read string $ipAddress ip address of the user who has caused the acp session access log entry
* @property-read int $time timestamp at which the acp session access log entry has been created
* @property-read string $requestURI uri of the logged request
* @property-read string $requestMethod used request method (`GET`, `POST`)
* @property-read string $className name of the PHP controller class
*/
class ACPSessionAccessLog extends DatabaseObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@
* @copyright 2001-2019 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*
* @property-read int $sessionLogID unique id of the acp session log entry
* @property-read string $sessionID id of the acp session the acp session log entry belongs to
* @property-read int|null $userID id of the user who has caused the acp session log entry or `null`
* @property-read string $ipAddress ip address of the user who has caused the acp session access log entry
* @property-read string $hostname name of the internet host corresponding to the user's IP address
* @property-read string $userAgent user agent of the user who has caused the acp session access log entry
* @property-read int $time timestamp at which the acp session log entry has been created
* @property-read int $lastActivityTime timestamp at which the associated session has been active for the last time
* @property-read string|null $active has the corresponding acp session id as the value if the session is still active, otherwise `null`
* @property-read int $sessionLogID unique id of the acp session log entry
* @property-read string $sessionID id of the acp session the acp session log entry belongs to
* @property-read ?int $userID id of the user who has caused the acp session log entry or `null`
* @property-read string $ipAddress ip address of the user who has caused the acp session access log entry
* @property-read string $hostname name of the internet host corresponding to the user's IP address
* @property-read string $userAgent user agent of the user who has caused the acp session access log entry
* @property-read int $time timestamp at which the acp session log entry has been created
* @property-read int $lastActivityTime timestamp at which the associated session has been active for the last time
*/
class ACPSessionLog extends DatabaseObject
{
Expand All @@ -30,15 +29,13 @@ class ACPSessionLog extends DatabaseObject
*/
protected static $databaseTableIndexName = 'sessionLogID';

/** @noinspection PhpMissingParentConstructorInspection */

/**
* @inheritDoc
*/
public function __construct($id, ?array $row = null, ?DatabaseObject $object = null)
{
if ($id !== null) {
$sql = "SELECT acp_session_log.*, user_table.username, 0 AS active
$sql = "SELECT acp_session_log.*, user_table.username
FROM wcf1_acp_session_log acp_session_log
LEFT JOIN wcf1_user user_table
ON user_table.userID = acp_session_log.userID
Expand All @@ -53,24 +50,6 @@ public function __construct($id, ?array $row = null, ?DatabaseObject $object = n
$this->handleData($row);
}

/**
* @return false
* @deprecated 5.4 - This method always returns false.
*/
public function isActive()
{
return false;
}

/**
* @return false
* @deprecated 5.4 - This method always returns false.
*/
public function isActiveUserSession()
{
return false;
}

/**
* Returns the ip address and attempts to convert into IPv4.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
* @copyright 2001-2019 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*
* @property-read int $templateID unique id of the acp template
* @property-read int|null $packageID id of the package which delivers the acp template
* @property-read string $templateName name of the template
* @property-read string $application abbreviation of the application to which the template belongs
* @property-read int $templateID unique id of the acp template
* @property-read int $packageID id of the package which delivers the acp template
* @property-read string $templateName name of the template
* @property-read string $application abbreviation of the application to which the template belongs
*/
class ACPTemplate extends DatabaseObject
{
Expand Down
Loading