Closed aik099 closed 5 years ago
Yes, this issue is mentioned on the wiki: https://github.com/facebook/pfff/wiki/Spatch#spacing-issues
You can avoid the issue by rewriting the patch as X
@aryx , can you please use fenced code blocks, because GitHub has formatted your suggestion as Markdown and I get what was changed.
Also I'm not sure, but using (...)
doesn't work and error is displayed. Because of that I hard to create 2 patches: one for mandatory arguments and one for mandatory + optional arguments.
I've tried rewriting patch like so:
-X = $this->Application->recallObject(Y1, Y2, Y3)
+X =&
$this->Application->recallObject(Y1, Y2, Y3)
but I'm getting an error:
Fatal error: exception Failure("could not parse: X = $this->Application->recallObject(Y1, Y2, Y3)\n\n$this->Application->recallObject(Y1, Y2, Y3)\n")
The following patch:
-X
+X =&
$this->Application->recallObject(Y1, Y2, Y3)
gives this error:
Fatal error: exception Failure("could not parse: X\n\n $this->Application->recallObject(Y1, Y2, Y3)\n")
X
- =
+ =&
$this->Application->recallObject(Y1, Y2, Y3);
Thanks, that worked perfectly.
I'm not sure why, but following was also done (spaces after comma in list(...)
construct):
list(
- $product_id, $backorder, $qty, $price, , , , $order_item_id, $options_salt, $item_data, $cost
+ $product_id, $backorder, $qty, $price,,,, $order_item_id, $options_salt, $item_data, $cost
) = $operation_row;
Patch code:
Code that is patched:
After fixing the
array('key' => true)
becomesarray('key'=>true)
(spaces before and after=>
are removed). I think this is incorrect to reformat code, that shouldn't be fixed as part of the patching.