Skip to content
This repository was archived by the owner on Dec 4, 2018. It is now read-only.
This repository was archived by the owner on Dec 4, 2018. It is now read-only.

Fix method signature to allow mocking #194

@SvenRtbg

Description

@SvenRtbg

The magic method __call in EpiTwitter deviates from the PHP default:

public function __call($name, $params = null/*, $username, $password*/)

or in short:

public function __call($name, $params = null)

That default value "null" is never been used in PHP. If you call a method without parameters, the $params value is an empty array.

But because of this signature it is impossible to mock that class with e.g. Mockery in strict mode.

It should not change anything if this function is reverted to the standard that PHP sets:

public function __call($name, $params)

For more details on one such problem, see http://stackoverflow.com/questions/21358268/mockery-call-has-a-different-signature

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions