subtleGradient/language-javascript-jsx

Package is messing with PHP formatting

sfw185 opened this issue · 1 comments

I initially assumed this bug to be related to the PHP formatter built into Atom, but after some trial and error I tracked it down to this package instead.

See original issue I posted here.

This is one code example that triggers the issue (extracted from a .php file):

// Set address name if it wasn't entered
if (!$location->getAddressOne() && $location->getAddressTwo())
{
    $location->setAddressOne($location->getAddressTwo() ? ' ' . $location->getAddressTwo() : '');
}

$hasAddress = $location->getAddressOne() ? true : false;

Changing the first line of the code to remove the apostrophe corrects the problem:

// Set address name if it wasnt entered
if (!$location->getAddressOne() && $location->getAddressTwo())
{
    $location->setAddressOne($location->getAddressTwo() ? ' ' . $location->getAddressTwo() : '');
}

$hasAddress = $location->getAddressOne() ? true : false;

Fixed in v0.3.2
Sorry :[