Phpinspectionsea: Change echo to short code

Created on 4 Apr 2017  路  10Comments  路  Source: kalessil/phpinspectionsea

Is it possible to add inspection which highlights <?php echo and allows to change it into <?=

enhancement fixed

Most helpful comment

Implemented (+same patter with print-construct)!

@rentalhost: as per your input I disabling the inspection by default
@dccampbell: your proposal implemented as well

All 10 comments

Yes, should be easy to do.

@kalessil I suggest you to create new label easy-pick This label can indicate that any contributor can work on it =) In some repositories I saw this label and for me it very useful.

@funivan : added the new label

I guess that we should think about a reversed-way too as option. I personally prefer to use the long term (<?php echo) instead of short term (<?=).

Bebo beep, the StaleBot is here. For one year nothing have happened here. It would be great if someone looked into details here within next 21 days when I'll close it.

@kalessil Why closed?

We added a bot which closes tickets without activity for ~1 year, reopening.

Related, although probably best done as a separate inspection:

_Remove terminating semicolon in short echo tags_
<?= expression; ?> to <?= expression ?>

@dccampbell : makes sense to include in this one as well. Thank you for the proposal.

Implemented (+same patter with print-construct)!

@rentalhost: as per your input I disabling the inspection by default
@dccampbell: your proposal implemented as well

Was this page helpful?
0 / 5 - 0 ratings