Skip to content

Add link to builder setter to process to make it easier to figure out what the validation is actually #132

Description

@LukasGoTom

some validation fails and from the error message, it is unclear what is the issue currently. For me helpful was adding a link to the generated class process from the builder like so:

BuilderClass.phptpl


            /**
             * Set the value of {{ property.getName() }}.
             *
             * @param {{ viewHelper.getTypeHintAnnotation(property) }} ${{ property.getAttribute(true) }}{% if property.getDescription() %} {{ property.getDescription() }}{% endif %}
             *
             * {@link {{ class }}::process{{ viewHelper.ucfirst(property.getAttribute()) }}}
             * {% if property.getValidators() %}@throws {% if generatorConfiguration.collectErrors() %}{{ viewHelper.getSimpleClassName(generatorConfiguration.getErrorRegistryClass()) }}{% else %}ValidationException{% endif %}{% endif %}
             *
             * @return static
             */
            public function set{{ viewHelper.ucfirst(property.getAttribute()) }}(
                {{ viewHelper.getType(property) }} ${{ property.getAttribute(true) }}
            ): static {

e.g.

        ` * {@link {{ class }}::process{{ viewHelper.ucfirst(property.getAttribute()) }}}`

so i at least have easy access to the validation to figure out whats actually happening in the validation to fix my call

so this outputs e.g. * {@link PackageRequest_Target_1::processKind}

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions