Skip to content

Default Validation Rules

Validation rules are based on the proposal for phpdoc tags PRS-19.

There are 4 issue levels:

  • error = issue MUST be fixed
  • warning = issue SHOULD be fixed
  • notice = issue MAY be fixed
  • ignore = issue is ignored

See configuration option rules on how to add your own rules or change the default set.

Errors

DocBlockApiNotInternalRule

DocBlockApiNotInternalRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockApiNotInternalRule
    issueLevel: error

DocBlockApiVisibilityPublicRule

DocBlockApiVisibilityPublicRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockApiVisibilityPublicRule
    issueLevel: error

DocBlockAuthorNameMissingRule

DocBlockAuthorNameMissingRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockAuthorNameMissingRule
    issueLevel: error

DocBlockInvalidTagsRule

DocBlockInvalidTagsRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockInvalidTagRule
    issueLevel: error

DocBlockLinkUrlRule

DocBlockLinkUrlRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockLinkUrlRule
    issueLevel: error
    match: { isInternal: false, isPublic: true }

DocBlockMethodAllowedRule

DocBlockMethodAllowedRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockMethodAllowedRule
    issueLevel: error

DocBlockParamAllowedRule

DocBlockParamAllowedRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockParamAllowedRule
    issueLevel: error

DocBlockParamNameOnlyOnceRule

DocBlockParamNameOnlyOnceRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockParamNameOnlyOnceRule
    issueLevel: error

DocBlockParamTypeRule

DocBlockParamTypeRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockParamTypeRule
    issueLevel: error

DocBlockParamUnknownRule

DocBlockParamUnknownRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockParamUnknownRule
    issueLevel: error

DocBlockReturnAllowedRule

DocBlockReturnAllowedRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockReturnAllowedRule
    issueLevel: error

DocBlockReturnOnlyOnceRule

DocBlockReturnOnlyOnceRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockReturnOnlyOnceRule
    issueLevel: error

Warnings

DocBlockApiNoDescriptionRule

DocBlockApiNoDescriptionRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockApiNoDescriptionRule
    issueLevel: warning

DocBlockCopyrightYearRule

DocBlockCopyrightYearRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockCopyrightYearRule
    issueLevel: warning

DocBlockDeprecatedCorrespondingSeeRule

DocBlockDeprecatedCorrespondingSeeRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockDeprecatedCorrespondingSeeRule
    issueLevel: warning

DocBlockDeprecatedVersionRule

DocBlockDeprecatedVersionRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockDeprecatedVersionRule
    issueLevel: warning

DocBlockSeeDescriptionRule

DocBlockSeeDescriptionRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockSeeDescriptionRule
    issueLevel: warning

DocBlockSinceVersionRule

DocBlockSinceVersionRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockSinceVersionRule
    issueLevel: warning

DocBlockVersionVersionRule

DocBlockVersionVersionRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockVersionVersionRule
    issueLevel: warning

PublicClassDocBlockMissingRule

PublicClassDocBlockMissingRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockMissingRule
    issueLevel: warning
    match: { getElementType: Class, isInternal: false }

PublicDocBlockSummaryMissingRule

PublicDocBlockSummaryMissingRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockSummaryMissingRule
    issueLevel: warning
    match: { isInternal: false, isPublic: true }

PublicInterfaceDocBlockMissingRule

PublicInterfaceDocBlockMissingRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockMissingRule
    issueLevel: warning
    match: { getElementType: Interface, isInternal: false }

PublicMethodDocBlockMissingRule

PublicMethodDocBlockMissingRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockMissingRule
    issueLevel: warning
    match: { getElementType: Method, isPublic: true, isInternal: false }

PublicTraitDocBlockMissingRule

PublicTraitDocBlockMissingRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockMissingRule
    issueLevel: warning
    match: { getElementType: Trait, isInternal: false }

TypeMissingRule

TypeMissingRule:
    class: Klitsche\Dog\Analyzer\Rules\TypeMissingRule
    issueLevel: warning

Notices

DocBlockAuthorEmailRule

DocBlockAuthorEmailRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockAuthorEmailRule
    issueLevel: notice

DocBlockDeprecatedDescriptionRule

DocBlockDeprecatedDescriptionRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockDeprecatedDescriptionRule
    issueLevel: notice

DocBlockLinkDescriptionRule

DocBlockLinkDescriptionRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockLinkDescriptionRule
    issueLevel: notice
    match: { isInternal: false, isPublic: true }

DocBlockSinceDescriptionRule

DocBlockSinceDescriptionRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockSinceDescriptionRule
    issueLevel: notice

DocBlockVersionDescriptionRule

DocBlockVersionDescriptionRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockVersionDescriptionRule
    issueLevel: notice

FileDocBlockCopyrightMissingRule

FileDocBlockCopyrightMissingRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockCopyrightMissingRule
    issueLevel: notice
    match: { getElementType: File, isInternal: false }

FileDocBlockLicenseMissingRule

FileDocBlockLicenseMissingRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockLicenseMissingRule
    issueLevel: notice
    match: { getElementType: File, isInternal: false }

PublicDocBlockDescriptionMissingRule

PublicDocBlockDescriptionMissingRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockDescriptionMissingRule
    issueLevel: notice
    match: { isInternal: false, isPublic: true }

PublicDocBlockParamDescriptionRule

PublicDocBlockParamDescriptionRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockParamDescriptionRule
    issueLevel: notice
    match: { isInternal: false, isPublic: true }

PublicDocBlockReturnDescriptionRule

PublicDocBlockReturnDescriptionRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockReturnDescriptionRule
    issueLevel: notice
    match: { isPublic: true, isInternal: false }

PublicFileDocBlockMissingRule

PublicFileDocBlockMissingRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockMissingRule
    issueLevel: notice
    match: { getElementType: File, isInternal: false }

PublicFunctionDocBlockMissingRule

PublicFunctionDocBlockMissingRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockMissingRule
    issueLevel: notice
    match: { getElementType: Function, isInternal: false }

PublicPropertyDocBlockMissingRule

PublicPropertyDocBlockMissingRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockMissingRule
    issueLevel: notice
    match: { getElementType: Property, isPublic: true, isInternal: false }

Ignored

FileDocBlockLinkMissingRule

FileDocBlockLinkMissingRule:
    class: Klitsche\Dog\Analyzer\Rules\DocBlockLinkMissingRule
    issueLevel: ignore
    match: { getElementType: File, isInternal: false }