From: Matthias Schmidt Date: Sat, 21 May 2016 20:06:41 +0000 (+0200) Subject: Add @noinspection PhpVariableVariableInspection tags X-Git-Tag: 3.0.0_Beta_1~1681^2~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7c9f22412bdeef11a01a3fbb4dd0a3c235d0a079;p=GitHub%2FWoltLab%2FWCF.git Add @noinspection PhpVariableVariableInspection tags --- diff --git a/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php b/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php index 34daad25a3..a7fe5f7a0e 100644 --- a/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php +++ b/wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php @@ -135,6 +135,7 @@ abstract class AbstractDatabaseObjectAction implements IDatabaseObjectAction, ID throw new SystemException('invalid value of parameter objects given'); } + /** @noinspection PhpVariableVariableInspection */ $this->objectIDs[] = $object->$indexName; } else { diff --git a/wcfsetup/install/files/lib/data/DatabaseObject.class.php b/wcfsetup/install/files/lib/data/DatabaseObject.class.php index 0277786bd6..d0bf669b61 100644 --- a/wcfsetup/install/files/lib/data/DatabaseObject.class.php +++ b/wcfsetup/install/files/lib/data/DatabaseObject.class.php @@ -165,6 +165,7 @@ abstract class DatabaseObject implements IStorableObject { public static function sort(&$objects, $sortBy, $sortOrder = 'ASC', $maintainIndexAssociation = true) { $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 diff --git a/wcfsetup/install/files/lib/data/TLegacyUserPropertyAccess.class.php b/wcfsetup/install/files/lib/data/TLegacyUserPropertyAccess.class.php index b47b141614..87d2d8ba4e 100644 --- a/wcfsetup/install/files/lib/data/TLegacyUserPropertyAccess.class.php +++ b/wcfsetup/install/files/lib/data/TLegacyUserPropertyAccess.class.php @@ -37,6 +37,7 @@ trait TLegacyUserPropertyAccess { // in case any code should rely on directly accessing user properties, // refer them to the user profile object + /** @noinspection PhpVariableVariableInspection */ return $this->getUserProfile()->$name; } } diff --git a/wcfsetup/install/files/lib/data/media/MediaAction.class.php b/wcfsetup/install/files/lib/data/media/MediaAction.class.php index afff874c5d..5816578571 100644 --- a/wcfsetup/install/files/lib/data/media/MediaAction.class.php +++ b/wcfsetup/install/files/lib/data/media/MediaAction.class.php @@ -333,10 +333,12 @@ class MediaAction extends AbstractDatabaseObjectAction implements ISearchAction, 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]; } } diff --git a/wcfsetup/install/files/lib/data/user/UserProfile.class.php b/wcfsetup/install/files/lib/data/user/UserProfile.class.php index 7e12afb2e0..0d0a7799c9 100644 --- a/wcfsetup/install/files/lib/data/user/UserProfile.class.php +++ b/wcfsetup/install/files/lib/data/user/UserProfile.class.php @@ -440,6 +440,7 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject { * @return boolean */ public function isAccessible($name) { + /** @noinspection PhpVariableVariableInspection */ switch ($this->$name) { case self::ACCESS_EVERYONE: return true; diff --git a/wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php b/wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php index 4358ed696a..76e087519a 100644 --- a/wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php +++ b/wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php @@ -247,6 +247,7 @@ class ClipboardHandler extends SingletonFactory { // validate object ids against loaded items (check for zombie object ids) $indexName = $objectList->getDatabaseTableIndexName(); foreach ($this->markedItems[$objectType] as $object) { + /** @noinspection PhpVariableVariableInspection */ $index = array_search($object->$indexName, $objectData['objectIDs']); unset($objectData['objectIDs'][$index]); } diff --git a/wcfsetup/install/files/lib/system/condition/UserGroupCondition.class.php b/wcfsetup/install/files/lib/system/condition/UserGroupCondition.class.php index b8ffbe4e5d..0b27097293 100644 --- a/wcfsetup/install/files/lib/system/condition/UserGroupCondition.class.php +++ b/wcfsetup/install/files/lib/system/condition/UserGroupCondition.class.php @@ -144,6 +144,7 @@ HTML; $returnValue = ""; foreach ($userGroups as $userGroup) { + /** @noinspection PhpVariableVariableInspection */ $returnValue .= ""; } diff --git a/wcfsetup/install/files/lib/system/condition/UserStateCondition.class.php b/wcfsetup/install/files/lib/system/condition/UserStateCondition.class.php index 6276adc65a..f8fa95f130 100644 --- a/wcfsetup/install/files/lib/system/condition/UserStateCondition.class.php +++ b/wcfsetup/install/files/lib/system/condition/UserStateCondition.class.php @@ -124,6 +124,7 @@ class UserStateCondition extends AbstractSingleFieldCondition implements IConten * @return string */ protected function getCheckedAttribute($propertyName) { + /** @noinspection PhpVariableVariableInspection */ if ($this->$propertyName) { return ' checked="checked"'; } diff --git a/wcfsetup/install/files/lib/system/search/acp/AbstractACPSearchResultProvider.class.php b/wcfsetup/install/files/lib/system/search/acp/AbstractACPSearchResultProvider.class.php index 0458939ec5..52cede72e6 100644 --- a/wcfsetup/install/files/lib/system/search/acp/AbstractACPSearchResultProvider.class.php +++ b/wcfsetup/install/files/lib/system/search/acp/AbstractACPSearchResultProvider.class.php @@ -25,8 +25,10 @@ abstract class AbstractACPSearchResultProvider { protected function validate(DatabaseObject $object, $optionsColumnName = 'options', $permissionsColumnName = 'permissions') { // check the options of this item $hasEnabledOption = true; + /** @noinspection PhpVariableVariableInspection */ if ($object->$optionsColumnName) { $hasEnabledOption = false; + /** @noinspection PhpVariableVariableInspection */ $options = explode(',', strtoupper($object->$optionsColumnName)); foreach ($options as $option) { if (defined($option) && constant($option)) { @@ -39,8 +41,10 @@ abstract class AbstractACPSearchResultProvider { // check the permission of this item for the active user $hasPermission = true; + /** @noinspection PhpVariableVariableInspection */ if ($object->$permissionsColumnName) { $hasPermission = false; + /** @noinspection PhpVariableVariableInspection */ $permissions = explode(',', $object->$permissionsColumnName); foreach ($permissions as $permission) { if (WCF::getSession()->getPermission($permission)) { diff --git a/wcfsetup/install/files/lib/system/user/UserProfileHandler.class.php b/wcfsetup/install/files/lib/system/user/UserProfileHandler.class.php index a14c839ce4..44cc2e22a6 100644 --- a/wcfsetup/install/files/lib/system/user/UserProfileHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/UserProfileHandler.class.php @@ -49,6 +49,7 @@ class UserProfileHandler extends SingletonFactory { * @return mixed */ public function __get($name) { + /** @noinspection PhpVariableVariableInspection */ return $this->userProfile->$name; }