/** * Validate vehicle data if @ValidateVehicle is used * * @param type $controller * @param type $methodName */ public function beforeController($controller, $methodName) { if ($this->reflector->hasAnnotation($this->annotation)) { $this->validate(); if ($this->validator->fails()) { throw new ValidationException($this->validator); } } }