syntax error, unexpected '-> code example
Example 1: syntax error, unexpected '->
$purchaseFactory = new PurchaseOrderFactory;
$purchaseOrder = $purchaseFactory->instance();
Example 2: syntax error, unexpected '->
$purchaseOrder = (new PurchaseOrderFactory)->instance();