Using view layouts echoes void return type. |
Hi,
while playing around with PHPStan I noticed that the current CI4 analysis level will complain about some basic handling of view layouts. In the Docs it is stated that views can extend view layouts by writing: PHP Code: <?= $this->extend('default') ?> While this in principle is working fine and without any warning, PHPStan complains that we try to output the return value of a method that has a void return type. Now I know we specifically exclude the 'views' folder in static analysis, however, I feel that PHPStan is correct here. The correct implementation would be: PHP Code: <?php $this->extend('default') ?> I personally feel, that sparing the two characters is not really worth the inconsistency here. How do others feel about that? |
Messages In This Thread |
Using view layouts echoes void return type. - by aschmitz - 07-11-2021, 02:19 PM
RE: Using view layouts echoes void return type. - by InsiteFX - 07-12-2021, 01:34 AM
RE: Using view layouts echoes void return type. - by aschmitz - 07-12-2021, 01:36 AM
RE: Using view layouts echoes void return type. - by includebeer - 07-12-2021, 07:26 AM
RE: Using view layouts echoes void return type. - by paulbalandan - 07-12-2021, 11:15 AM
|