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
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 @@ -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 @@ -144,7 +144,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 @@ -141,7 +141,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 @@ -23,8 +23,6 @@ trait TLegacyUserPropertyAccess
*/
public function __get($name)
{
/** @noinspection PhpUndefinedClassInspection */
/** @noinspection PhpUndefinedMethodInspection */
$value = parent::__get($name);
if ($value !== null) {
return $value;
Expand All @@ -36,7 +34,6 @@ public function __get($name)

// in case any code should rely on directly accessing user properties,
// refer them to the user profile object
/** @noinspection PhpVariableVariableInspection */
return $this->getUserProfile()->{$name};
}
}
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ class ACPSessionLog extends DatabaseObject
*/
protected static $databaseTableIndexName = 'sessionLogID';

/** @noinspection PhpMissingParentConstructorInspection */

/**
* @inheritDoc
*/
Expand Down
2 changes: 0 additions & 2 deletions wcfsetup/install/files/lib/data/ad/Ad.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ public function getLocation()
$objectType = ObjectTypeCache::getInstance()->getObjectType($this->objectTypeID);

$location = WCF::getLanguage()->get('wcf.acp.ad.location.' . $objectType->objectType);
/** @noinspection PhpUndefinedFieldInspection */
if ($objectType->categoryname != 'com.woltlab.wcf.global') {
/** @noinspection PhpUndefinedFieldInspection */
$location = WCF::getLanguage()->get('wcf.acp.ad.location.category.' . $objectType->categoryname) . ': ' . $location;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ public function create()
if (!empty($this->parameters['content'])) {
foreach ($this->parameters['content'] as $languageID => $content) {
if (!empty($content['htmlInputProcessor'])) {
/** @noinspection PhpUndefinedMethodInspection */
$content['content'] = $content['htmlInputProcessor']->getHtml();
}

Expand Down Expand Up @@ -147,7 +146,6 @@ public function create()

// save embedded objects
if (!empty($content['htmlInputProcessor'])) {
/** @noinspection PhpUndefinedMethodInspection */
$content['htmlInputProcessor']->setObjectID($articleContent->articleContentID);
if (MessageEmbeddedObjectManager::getInstance()->registerObjects($content['htmlInputProcessor'])) {
$articleContentEditor->update(['hasEmbeddedObjects' => 1]);
Expand Down Expand Up @@ -206,7 +204,6 @@ public function update()

foreach ($this->parameters['content'] as $languageID => $content) {
if (!empty($content['htmlInputProcessor'])) {
/** @noinspection PhpUndefinedMethodInspection */
$content['content'] = $content['htmlInputProcessor']->getHtml();
}

Expand Down Expand Up @@ -282,7 +279,6 @@ public function update()

// save embedded objects
if (!empty($content['htmlInputProcessor'])) {
/** @noinspection PhpUndefinedMethodInspection */
$content['htmlInputProcessor']->setObjectID($articleContent->articleContentID);
if ($articleContent->hasEmbeddedObjects != MessageEmbeddedObjectManager::getInstance()->registerObjects($content['htmlInputProcessor'])) {
$articleContentEditor->update(['hasEmbeddedObjects' => $articleContent->hasEmbeddedObjects ? 0 : 1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
class CategoryArticleList extends AccessibleArticleList
{
/** @noinspection PhpMissingParentConstructorInspection */

/**
* Creates a new CategoryArticleList object.
*
Expand Down
4 changes: 0 additions & 4 deletions wcfsetup/install/files/lib/data/box/BoxAction.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public function create()
if (!empty($this->parameters['content'])) {
foreach ($this->parameters['content'] as $languageID => $content) {
if (!empty($content['htmlInputProcessor'])) {
/** @noinspection PhpUndefinedMethodInspection */
$content['content'] = $content['htmlInputProcessor']->getHtml();
}

Expand All @@ -90,7 +89,6 @@ public function create()

// save embedded objects
if (!empty($content['htmlInputProcessor'])) {
/** @noinspection PhpUndefinedMethodInspection */
$content['htmlInputProcessor']->setObjectID($boxContent->boxContentID);
if (MessageEmbeddedObjectManager::getInstance()->registerObjects($content['htmlInputProcessor'])) {
$boxContentEditor->update(['hasEmbeddedObjects' => 1]);
Expand Down Expand Up @@ -157,7 +155,6 @@ public function update()

foreach ($this->parameters['content'] as $languageID => $content) {
if (!empty($content['htmlInputProcessor'])) {
/** @noinspection PhpUndefinedMethodInspection */
$content['content'] = $content['htmlInputProcessor']->getHtml();
}

Expand Down Expand Up @@ -195,7 +192,6 @@ public function update()

// save embedded objects
if (!empty($content['htmlInputProcessor'])) {
/** @noinspection PhpUndefinedMethodInspection */
$content['htmlInputProcessor']->setObjectID($boxContent->boxContentID);
if ($boxContent->hasEmbeddedObjects != MessageEmbeddedObjectManager::getInstance()->registerObjects($content['htmlInputProcessor'])) {
$boxContentEditor->update(['hasEmbeddedObjects' => $boxContent->hasEmbeddedObjects ? 0 : 1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ class ClipboardItemAction extends AbstractDatabaseObjectAction
*/
public $objectTypeID = 0;

/** @noinspection PhpMissingParentConstructorInspection */

/**
* This is a heavily modified constructor which behaves differently from other DBOActions,
* primarily because this class just masquerades as a regular DBOAction.
Expand Down
4 changes: 0 additions & 4 deletions wcfsetup/install/files/lib/data/like/LikeAction.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,10 @@ public function getLikeDetails()
$values = [];
if (!empty($data[Like::LIKE])) {
$values[Like::LIKE] = new GroupedUserList(WCF::getLanguage()->get('wcf.like.details.like'));
/** @noinspection PhpUndefinedMethodInspection */
$values[Like::LIKE]->addUserIDs($data[Like::LIKE]);
}
if (!empty($data[Like::DISLIKE])) {
$values[Like::DISLIKE] = new GroupedUserList(WCF::getLanguage()->get('wcf.like.details.dislike'));
/** @noinspection PhpUndefinedMethodInspection */
$values[Like::DISLIKE]->addUserIDs($data[Like::DISLIKE]);
}

Expand Down Expand Up @@ -300,12 +298,10 @@ public function getGroupedUserList()
$values = [];
if (!empty($data[Like::LIKE])) {
$values[Like::LIKE] = new GroupedUserList(WCF::getLanguage()->get('wcf.like.details.like'));
/** @noinspection PhpUndefinedMethodInspection */
$values[Like::LIKE]->addUserIDs($data[Like::LIKE]);
}
if (!empty($data[Like::DISLIKE])) {
$values[Like::DISLIKE] = new GroupedUserList(WCF::getLanguage()->get('wcf.like.details.dislike'));
/** @noinspection PhpUndefinedMethodInspection */
$values[Like::DISLIKE]->addUserIDs($data[Like::DISLIKE]);
}

Expand Down
8 changes: 0 additions & 8 deletions wcfsetup/install/files/lib/data/media/MediaAction.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public function validateUpload()
$this->readBoolean('imagesOnly', true);
$this->readInteger('categoryID', true);

/** @noinspection PhpUndefinedMethodInspection */
$this->parameters['__files']->validateFiles(new MediaUploadFileValidationStrategy($this->parameters['imagesOnly']));

if ($this->parameters['categoryID']) {
Expand All @@ -77,7 +76,6 @@ public function upload()
'rotateImages' => true,
], $additionalData);

/** @noinspection PhpUndefinedMethodInspection */
$this->parameters['__files']->saveFiles($saveStrategy);

/** @var Media[] $mediaFiles */
Expand Down Expand Up @@ -106,7 +104,6 @@ public function upload()
}

/** @var UploadFile[] $files */
/** @noinspection PhpUndefinedMethodInspection */
$files = $this->parameters['__files']->getFiles();
foreach ($files as $file) {
if ($file->getValidationErrorType()) {
Expand Down Expand Up @@ -480,11 +477,9 @@ public function update()
if (isset($this->parameters[$type])) {
if (\is_array($this->parameters[$type])) {
if (isset($this->parameters[$type][$language->languageID])) {
/** @noinspection PhpVariableVariableInspection */
${$type} = $this->parameters[$type][$language->languageID];
}
} else {
/** @noinspection PhpVariableVariableInspection */
${$type} = $this->parameters[$type];
}
}
Expand Down Expand Up @@ -760,7 +755,6 @@ public function validateReplaceFile()

$this->getSingleObject();

/** @noinspection PhpUndefinedMethodInspection */
$this->parameters['__files']->validateFiles(
new MediaReplaceUploadFileValidationStrategy($this->getSingleObject()->getDecoratedObject())
);
Expand Down Expand Up @@ -809,7 +803,6 @@ public function replaceFile()
'largeThumbnailHeight' => 0,
]);

/** @noinspection PhpUndefinedMethodInspection */
$this->parameters['__files']->saveFiles($saveStrategy);

/** @var Media[] $mediaFiles */
Expand Down Expand Up @@ -838,7 +831,6 @@ public function replaceFile()
}

/** @var UploadFile[] $files */
/** @noinspection PhpUndefinedMethodInspection */
$files = $this->parameters['__files']->getFiles();
foreach ($files as $file) {
if ($file->getValidationErrorType()) {
Expand Down
4 changes: 0 additions & 4 deletions wcfsetup/install/files/lib/data/page/PageAction.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public function create()
if (!empty($this->parameters['content'])) {
foreach ($this->parameters['content'] as $languageID => $content) {
if (!empty($content['htmlInputProcessor'])) {
/** @noinspection PhpUndefinedMethodInspection */
$content['content'] = $content['htmlInputProcessor']->getHtml();
}

Expand Down Expand Up @@ -116,7 +115,6 @@ public function create()

// save embedded objects
if (!empty($content['htmlInputProcessor'])) {
/** @noinspection PhpUndefinedMethodInspection */
$content['htmlInputProcessor']->setObjectID($pageContent->pageContentID);
if (MessageEmbeddedObjectManager::getInstance()->registerObjects($content['htmlInputProcessor'])) {
$pageContentEditor->update(['hasEmbeddedObjects' => 1]);
Expand Down Expand Up @@ -175,7 +173,6 @@ public function update()

foreach ($this->parameters['content'] as $languageID => $content) {
if (!empty($content['htmlInputProcessor'])) {
/** @noinspection PhpUndefinedMethodInspection */
$content['content'] = $content['htmlInputProcessor']->getHtml();
}

Expand Down Expand Up @@ -232,7 +229,6 @@ public function update()

// save embedded objects
if (!empty($content['htmlInputProcessor'])) {
/** @noinspection PhpUndefinedMethodInspection */
$content['htmlInputProcessor']->setObjectID($pageContent->pageContentID);
if ($pageContent->hasEmbeddedObjects != MessageEmbeddedObjectManager::getInstance()->registerObjects($content['htmlInputProcessor'])) {
$pageContentEditor->update(['hasEmbeddedObjects' => $pageContent->hasEmbeddedObjects ? 0 : 1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public function create()
$this->parameters['data']['endDate'] = 0;
} else {
$d = DateUtil::getDateTimeByTimestamp($this->parameters['data']['startDate']);
/** @noinspection PhpUndefinedMethodInspection */
$d->add($this->parameters['subscription']->getDateInterval());
$this->parameters['data']['endDate'] = $d->getTimestamp();
}
Expand Down
2 changes: 0 additions & 2 deletions wcfsetup/install/files/lib/data/template/Template.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ class Template extends DatabaseObject
*/
protected static $systemCriticalTemplates = ['headIncludeJavaScript', 'shared_wysiwyg', 'wysiwygToolbar'];

/** @noinspection PhpMissingParentConstructorInspection */

/**
* @inheritDoc
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ public function validateSwitchContext() {}
*/
public function switchContext()
{
/** @noinspection PhpUndefinedFieldInspection */
$userAction = new UserAction([WCF::getUser()], 'update', [
'options' => [
User::getUserOptionID('recentActivitiesFilterByFollowing') => WCF::getUser()->recentActivitiesFilterByFollowing ? 0 : 1,
Expand Down
Loading