src/phpDocumentor/Plugin/Core/Descriptor/Validator/Functions/AreAllArgumentsValid.php
public function validate($element)
    {
        $docBlock = $element->getDocBlock();
        if (null === $docBlock) {
            throw new \UnexpectedValueException(
                'A DocBlock should be present (and validated) before this validator can be applied'
            );
        }

        if ($docBlock->hasTag('return')) {
            $returnTag = current($docBlock->getTagsByName('return'));
            if ($returnTag->getType() == 'type') {
                return new Error(LogLevel::WARNING, 'PPC:ERR-50017', $element->getLinenumber());
            }
        }

        return null;
    }
public function validate($element)
    {
        $docBlock = $element->getDocBlock();
        if (null === $docBlock) {
            throw new \UnexpectedValueException(
                'A DocBlock should be present (and validated) before this validator can be applied'
            );
        }

        if ($docBlock->hasTag('return')) {
            $returnTag = current($docBlock->getTagsByName('return'));
            if ($returnTag->getType() == 'type') {
                return new Error(LogLevel::WARNING, 'PPC:ERR-50017', $element->getLinenumber());
            }
        }

        return null;
    }
public function validate ( $ element ) { $ docBlock = $ element -> getDocBlock ( ) ; if ( null === $ docBlock ) { throw new \ UnexpectedValueException ( 'A DocBlock should be present (and validated) before this validator can be applied' ) ; } if ( $ docBlock -> hasTag ( 'return' ) ) { $ returnTag = current ( $ docBlock -> getTagsByName ( 'return' ) ) ; if ( $ returnTag -> getType ( ) == 'type' ) { return new Error ( LogLevel :: WARNING , 'PPC:ERR-50017' , $ element -> getLinenumber ( ) ) ; } } return null ; }
Validates whether the given Reflector's arguments match the business rules of phpDocumentor.

@param BaseReflector $element

@throws \UnexpectedValueException if no DocBlock is associated with the given Reflector.

@return Error|null
Validates whether the given Reflector s arguments match the business rules of phpDocumentor .