Open ThomasLandauer opened 4 months ago
Well, you can certainly see it as noise. But that's the way that PHP has been taking over the last view years.
void
: psalm is reporting:
MissingReturnType: Method App\Tests\Acceptance\FirstCest::_before does not have a return type, expecting void
declare(strict_types=1);
is good practice todayfinal
- overlooked that yesterday :-)$scenario
(see https://codeception.com/docs/AdvancedUsage) - probably rarely used, but very hard to find in the docs...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.
In the past I was against adding
: void
at the end of methods because it doesn't add anything relevant to the tests and because it can make the suite tests harder to read. Strict types were also suggested by me, but it was also not decided to add them. I even suggested that Cest should be 'final' classes, but again, the simpler the default generated code the better I guess was the reasoning.