Domanda

Is there a way to prevent PHPStorm 6 adding spaces after <?= and before ?> in constructions like

<a href="<?=$variable?>">blah</a>

during Reformat Code (Ctrl+Alt+L) ?

Suddenly, it inserts spaces

<a href="<?= $variable ?>">blah</a>
            ^         ^
            |  here   |  

Googling and digging Settings dialog didn't help.

Thanks.

È stato utile?

Soluzione

File->Settings->Editor->Code Style->PHP->Spaces->Within

Altri suggerimenti

Try using the trim function in PHP

http://php.net/manual/en/function.trim.php

By telling it to remove whitespace or something that could strip it down to its true value. I'm not too familiar with PHPStorm.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top