src/ValidateInterceptor.php
private function getOnValidate(\ReflectionMethod $method)
    {
        /** @var $valid Valid */
        $valid = $this->reader->getMethodAnnotation($method, Valid::class);
        $class = $method->getDeclaringClass();
        $onMethods = $this->findOnMethods($class, $valid);
        if ($onMethods[0] && $onMethods[0] instanceof \ReflectionMethod) {
            return $onMethods;
        }
        throw new ValidateMethodNotFound($method->getShortName());
    }
private function getOnValidate(\ReflectionMethod $method)
    {
        /** @var $valid Valid */
        $valid = $this->reader->getMethodAnnotation($method, Valid::class);
        $class = $method->getDeclaringClass();
        $onMethods = $this->findOnMethods($class, $valid);
        if ($onMethods[0] && $onMethods[0] instanceof \ReflectionMethod) {
            return $onMethods;
        }
        throw new ValidateMethodNotFound($method->getShortName());
    }
private function getOnValidate ( \ ReflectionMethod $ method ) { /** @var $valid Valid */ $ valid = $ this -> reader -> getMethodAnnotation ( $ method , Valid :: class ) ; $ class = $ method -> getDeclaringClass ( ) ; $ onMethods = $ this -> findOnMethods ( $ class , $ valid ) ; if ( $ onMethods [ 0 ] && $ onMethods [ 0 ] instanceof \ ReflectionMethod ) { return $ onMethods ; } throw new ValidateMethodNotFound ( $ method -> getShortName ( ) ) ; }
Return Validate and OnFailure method

@param \ReflectionMethod $method

@return \ReflectionMethod[] [$onValidateMethod, $onFailureMethod]
Return Validate and OnFailure method