Skip to content

Conversation

@lacatoire
Copy link

Summary

Apply PSR-12 fixes across the codebase:

  • Replace else ifelseif.
  • Ensure class instantiations always use parentheses: new Foo() even with no args.
  • Add explicit visibility to properties, methods, and constants.
  • Fix modifier order: abstract/final → visibility → static.
  • Enforce short type keywords per PSR-12: bool (not boolean), int (not integer), float (not double/real), string, array, object, callable, iterable, null.

Motivation

Improves readability and PSR-12 compliance. No functional changes.

Impact

  • ✅ No behavior change / BC break.
  • ✅ Pure style/consistency.

Examples

Before:
else if ($ok) { … }
new Foo;
final static public function run() {}
/** @param integer $n @return boolean */
private const FOO = 1;

After:
elseif ($ok) { … }
new Foo();
final public static function run(): void {}
/** @param int $n @return bool */
public const FOO = 1;

Reference

@lacatoire lacatoire changed the title style: enforce PSR-12 (elseif, new(), visibility order, explicit visi… Apply PSR-12 coding standard fixes (elseif, new(), visibility, modifier order, short type keywords) Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant