break;
case 'selection':
- /** @var SingleSelectionFormField $languageCategoryIDMode */
+ /** @var SingleSelectionFormField $languageCategoryID */
$languageCategoryID = $formField->getDocument()->getNodeById('languageCategoryID');
$languageCategory = LanguageFactory::getInstance()->getCategoryByID($languageCategoryID->getSaveValue());
// 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;
case 'general':
$elements = $xpath->query('child::*', $category);
+
+ /** @var \DOMElement $element */
foreach ($elements as $element) {
switch ($element->tagName) {
case 'date':
" 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(
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(
return false;
}
+ /** @noinspection PhpUndefinedMethodInspection */
if (is_subclass_of($className::getBaseClass(), $targetClass)) {
return true;
}