Skip to content
This repository has been archived by the owner on Mar 29, 2020. It is now read-only.

remove default value and type hinting for magic methods #30

Merged
merged 1 commit into from
May 28, 2019

Conversation

smokills
Copy link
Contributor

I was writing some tests, and in creating a mock of this class I came across this error:

ErrorException: Declaration of Mockery_1_Appstract_LushHttp_Lush::__call($method, array $args) should be compatible with Appstract\LushHttp\Lush::__call($method, array $arguments = Array)

Looking at the signature of the __call methods, I noticed that default values had been entered.

Since this methods are always handled by php itself, and $arguments will always be an array, even if no arguments were passed to the called methods, to avoid mocking problems I've removed defaults and tipe hinting declarations.

@ovanschie ovanschie merged commit 5e36317 into appstract:master May 28, 2019
@ovanschie
Copy link
Member

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants