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

fix: NativeTypeDeclarationCasingFixe - handle static property without type #7589

Merged
merged 2 commits into from Dec 17, 2023
Merged

fix: NativeTypeDeclarationCasingFixe - handle static property without type #7589

merged 2 commits into from Dec 17, 2023

Conversation

kubawerlos
Copy link
Contributor

@kubawerlos kubawerlos commented Dec 17, 2023

Fixes #7586

@kubawerlos kubawerlos enabled auto-merge (squash) December 17, 2023 13:02
@coveralls
Copy link

Coverage Status

coverage: 94.801%. remained the same
when pulling dd58a69 on 6b7562617765726c6f73:fix_NativeTypeDeclarationCasingFixer
into 93fa899 on PHP-CS-Fixer:master.


public function __construct()
{
parent::__construct();

$this->propertyTypeModifiers = [[T_PRIVATE], [T_PROTECTED], [T_PUBLIC], [T_VAR]];
$this->beforePropertyTypeTokens = ['{', ';', [T_PRIVATE], [T_PROTECTED], [T_PUBLIC], [T_VAR]];
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we add support for PHP8 attributes too? I know this is a fix PR, but maybe you would like to add it too 😉.

Copy link
Member

Choose a reason for hiding this comment

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

Nevermind, auto-merge enabled 😆.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it possible to add an attribute without visibility?

Copy link
Member

@Wirone Wirone Dec 17, 2023

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will be working well, I guess we cannot make any failing test, and only add some to prevent regression.

@kubawerlos kubawerlos merged commit 88fc5fe into PHP-CS-Fixer:master Dec 17, 2023
25 checks passed
@kubawerlos kubawerlos deleted the fix_NativeTypeDeclarationCasingFixer branch December 17, 2023 15:07
danog pushed a commit to zoonru/PHP-CS-Fixer that referenced this pull request Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type mismatch in NativeTypeDeclarationCasingFixer::getFirstIndexOfType()
3 participants