Skip to content

Add option to check internal class capitalization#313

Merged
ondrejmirtes merged 1 commit intophpstan:masterfrom
Riimu:add-internal-class-case-check
Sep 1, 2020
Merged

Add option to check internal class capitalization#313
ondrejmirtes merged 1 commit intophpstan:masterfrom
Riimu:add-internal-class-case-check

Conversation

@Riimu
Copy link
Contributor

@Riimu Riimu commented Sep 1, 2020

Currently PHPStan has option checkFunctionNameCase which checks the case sensitivity of function names in code. This checks the cases of both user defined and built in PHP functions.

PHPStan also has an option checkClassCaseSensitivity, but that option does not check the capitalization of built in classes. The reasoning for this is that using internal classes with incorrect capitalization does not actually result in bugs, but usage of user defined classes can result in bugs especially due to class loader behavior.

This PR adds a new option checkInternalClassCaseSensitivity which, when enabled, also checks the capitalization of internal classes for consistency.

@ondrejmirtes
Copy link
Member

Flawless contribution ❤️

@ondrejmirtes ondrejmirtes merged commit 3e6a07f into phpstan:master Sep 1, 2020
@ondrejmirtes
Copy link
Member

Thank you!

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.

2 participants