Improve variable documentation
authorMatthias Schmidt <gravatronics@live.com>
Sun, 9 Sep 2018 13:25:11 +0000 (15:25 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 9 Sep 2018 13:25:21 +0000 (15:25 +0200)
wcfsetup/install/files/lib/acp/form/LanguageItemAddForm.class.php
wcfsetup/install/files/lib/data/comment/StructuredCommentList.class.php
wcfsetup/install/files/lib/data/style/StyleEditor.class.php
wcfsetup/install/files/lib/system/form/builder/field/data/CustomFormFieldDataProcessor.class.php
wcfsetup/install/files/lib/system/form/builder/field/validation/FormFieldValidator.class.php
wcfsetup/install/files/lib/util/ClassUtil.class.php

index 78df3b3bc7777abb699b02d81ba7099d2666f57e..6baa302f771b94fe87105411f67b373ad59a7063 100644 (file)
@@ -124,7 +124,7 @@ class LanguageItemAddForm extends AbstractFormBuilderForm {
                                                                break;
                                                                
                                                        case 'selection':
-                                                               /** @var SingleSelectionFormField $languageCategoryIDMode */
+                                                               /** @var SingleSelectionFormField $languageCategoryID */
                                                                $languageCategoryID = $formField->getDocument()->getNodeById('languageCategoryID');
                                                                
                                                                $languageCategory = LanguageFactory::getInstance()->getCategoryByID($languageCategoryID->getSaveValue());
index f2de81f94f1fc6eeb7384789634f7d72341a2857..4d019686f2b1086b421f6d1a09727ddcef7a158c 100644 (file)
@@ -105,7 +105,7 @@ class StructuredCommentList extends CommentList {
                
                // fetch response ids
                $responseIDs = $userIDs = [];
-               /** @var Comment $comment */
+               /** @var StructuredComment $comment */
                foreach ($this->objects as $comment) {
                        if (!$this->minCommentTime || $comment->time < $this->minCommentTime) $this->minCommentTime = $comment->time;
                        
index 52a3e72c3eeeca0a715ee7ca9e19e9606ae0c62a..ee86e531b911cded229d7b83233eff575a91ec3d 100644 (file)
@@ -228,6 +228,8 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject
                                
                                case 'general':
                                        $elements = $xpath->query('child::*', $category);
+                                       
+                                       /** @var \DOMElement $element */
                                        foreach ($elements as $element) {
                                                switch ($element->tagName) {
                                                        case 'date':
index bbb9e18c5b46c293a6c4055483672b44a6978bb0..f50ffe8f5b6298f5d0fe069923ab6d1712c156b7 100644 (file)
@@ -47,6 +47,8 @@ class CustomFormFieldDataProcessor implements IFormFieldDataProcessor {
                                " parameter" . (count($parameters) !== 1 ? 's' : '') . " are expected."
                        );
                }
+               
+               /** @var \ReflectionClass $parameterClass */
                $parameterClass = $parameters[0]->getClass();
                if ($parameterClass === null || ($parameterClass->getName() !== IFormDocument::class && !is_subclass_of($parameterClass->getName(), IFormDocument::class))) {
                        throw new \InvalidArgumentException(
index 2436ebc47f319775b79247818313b24349cff4cc..a83de5508bc2efc1f69750afdbad1369b315afbd 100644 (file)
@@ -37,6 +37,7 @@ class FormFieldValidator implements IFormFieldValidator {
                if (count($parameters) !== 1) {
                        throw new \InvalidArgumentException("The validation function must expect one parameter, instead " . count($parameters) . " parameters are expected.");
                }
+               /** @var \ReflectionClass $parameterClass */
                $parameterClass = $parameters[0]->getClass();
                if ($parameterClass === null || ($parameterClass->getName() !== IFormField::class && !is_subclass_of($parameterClass->getName(), IFormField::class))) {
                        throw new \InvalidArgumentException(
index 7df38c9e6e87f67a32f730c76e87768c140ca38b..3339871678dfc30b9f9c925e6e8621abb90dee3d 100644 (file)
@@ -76,6 +76,7 @@ final class ClassUtil {
                                return false;
                        }
                        
+                       /** @noinspection PhpUndefinedMethodInspection */
                        if (is_subclass_of($className::getBaseClass(), $targetClass)) {
                                return true;
                        }