-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
generate:cest: Adding declare(strict_types=1); and return type void to generated files
#6736
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
Conversation
|
In the past I was against adding |
|
Well, you can certainly see it as noise. But that's the way that PHP has been taking over the last few years.
My main argument is: That's the way good PHP code should look nowadays, so we should gently guide people to this direction. And the generated files are just a suggestion - anybody can easily delete the stuff they don't want. |
declare(strict_types=1); and return type void to generated filesdeclare(strict_types=1); and return type void to generated files
TavoNiievez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ThomasLandauer,
In the interest of going forward with this PR I have decided to approve the following changes you argued and I agree with for the next minor version 5.2:
- ✅
declare(strict_types=1); - ✅
final - ✅
: void - ✅ short comments for each method.
You are of course free to open another PR with the remaining changes:
- ❎
#[Before]. I don't agree with adding this because I think it is adding too much documentation on related methods. Also, the documentation referenced in that link has errors such as "#[Bbefore]". - ❎
Scenario \$scenario. The use of scenario doesn't seem very common, many people won't need it when writing their tests, so putting it there just to let people know it exists doesn't really seem necessary, since it's unlikely to increase its use.
|
OK, this is a step forward. For the remaining two, I'm undecided myself... And see Codeception/codeception.github.com#868 for the typos ;-) |
No description provided.