Skip to content

v2.3.0

Choose a tag to compare

@github-actions github-actions released this 28 Feb 12:11
5960524

Added

  • Apermo.PHP.ExitUsage sniff: enforces exit() over
    die, die(), and bare exit. Auto-fixable.
  • Apermo.NamingConventions.MinimumVariableNameLength
    sniff: warns on variable names shorter than 4 characters.
    Configurable allowlist with extend="true" support.
  • SlevomatCodingStandard.Functions.StaticClosure: flags
    closures that do not use $this.
  • SlevomatCodingStandard.Functions.RequireTrailingCommaInCall:
    requires trailing comma in multi-line function calls.
  • SlevomatCodingStandard.Functions.FunctionLength: flags
    functions longer than 50 lines.
  • SlevomatCodingStandard.Classes.ClassLength: flags
    classes longer than 500 lines.
  • SlevomatCodingStandard.Complexity.Cognitive: flags
    overly complex methods (warning at 15, error at 30).
  • SlevomatCodingStandard.Variables.UnusedVariable: flags
    unused local variables with foreach key-only exemption.
  • SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation:
    flags appending to undefined variables.
  • SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator:
    flags isset() ternaries replaceable with ??.
  • SlevomatCodingStandard.TypeHints.LongTypeHints: flags
    integerint, booleanbool in annotations.
  • SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition:
    flags null|string in favor of string|null.
  • Universal.Operators.DisallowLogicalAndOr: flags and
    / or in favor of && / ||.
  • Universal.ControlStructures.DisallowAlternativeSyntax:
    flags endif, endwhile, endfor, etc.
  • Text domain validation: documented WordPress.WP.I18n
    text_domain configuration in ruleset with integration
    test.