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

DX: Enforce consistent naming in tests #7556

Merged
merged 4 commits into from Dec 14, 2023
Merged

DX: Enforce consistent naming in tests #7556

merged 4 commits into from Dec 14, 2023

Conversation

kubawerlos
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Dec 13, 2023

Coverage Status

coverage: 94.917%. remained the same
when pulling c0d2dda on 6b7562617765726c6f73:dx_unify_tests
into df13d63 on PHP-CS-Fixer:master.

@Wirone Wirone changed the title DX: unify tests DX: Enforce consistent naming in tests Dec 14, 2023
@kubawerlos kubawerlos enabled auto-merge (squash) December 14, 2023 11:14
@kubawerlos kubawerlos merged commit 19474f5 into PHP-CS-Fixer:master Dec 14, 2023
25 checks passed
@kubawerlos kubawerlos deleted the dx_unify_tests branch December 14, 2023 11:21
@Wirone
Copy link
Member

Wirone commented Dec 14, 2023

Thank you @kubawerlos, great work 🍻!

Comment on lines +425 to +434
$extraMethods = [];
foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
if ($method->getDeclaringClass()->getName() !== $class->getName()) {
continue;
}
if (\in_array($method->getName(), $methodNames, true)) {
continue;
}
$extraMethods[] = $method->getName();
}
Copy link
Member

@keradus keradus Dec 14, 2023

Choose a reason for hiding this comment

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

array_filter ? non blocking, only a habit foreach { push() } -> filter()
(it would avoid extending array size iteration after iteration)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done: #7558

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants