Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved typing and uses of classes #4

Merged
merged 2 commits into from
Feb 5, 2024
Merged

Conversation

jonnynews
Copy link
Contributor

Implement the SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition and SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue rules. These rules improve how nullable types are handled.
These rules convert
?int $image_id to ?int $image_id = null and
int $image_id = null to ?int $image_id = null

The SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly rules, force classes to be imported, so references like this new \Foo\Boo(); to use \Foo\Boo; new Boo();

@jonnynews jonnynews self-assigned this Feb 2, 2024
@jonnynews jonnynews requested a review from a team as a code owner February 2, 2024 16:39
@jonnynews
Copy link
Contributor Author

CC @mohanrajpac

mohanrajpac
mohanrajpac previously approved these changes Feb 2, 2024
Copy link
Contributor

@mohanrajpac mohanrajpac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jonnynews jonnynews merged commit 4b40381 into main Feb 5, 2024
1 check passed
@jonnynews jonnynews deleted the fix/improve-typing branch February 5, 2024 10:05
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.

None yet

2 participants