Skip to content

implement the fluent interface #25

@weboperator

Description

@weboperator

The function addEcommerceItem() has no return value.

Due to your documentation this function should be called before e.g. doTrackEcommerceOrder() is called.
If you do so you will get

Fatal error: Call to a member function doTrackEcommerceOrder() on null

In our opinion you should implement the fluent interface and return the object instance:

689 = $this->ecommerceItems[] = array($sku, $name, $category, $price, $quantity);
690 + return $this;

Thanks in advance for feedback!
Have a great time!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions