Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix all phpstan errors are level 7 #61

Open
wants to merge 1 commit into
base: master
from

Conversation

@robbieaverill
Copy link
Collaborator

commented Jul 23, 2019

We can also add phpstan to Travis builds to ensure this stays strict, if we'd like to, but I haven't done that in this PR.

This is mostly PHPDoc and method incompatibility logic fixes where methods can return a Package or an array, but the implementations of them aren't built to handle that.

@@ -81,20 +81,24 @@ public function search($query, array $filters = array())
do {
$response = $this->request($response['next']);
$response = $this->parse($response);
$results = array_merge($results, $this->create($response));
$createResult = $this->create($response);

This comment has been minimized.

Copy link
@robbieaverill

robbieaverill Jul 23, 2019

Author Collaborator

This can return an array, but can also return a Package

@@ -190,7 +198,7 @@ protected function request($url)
}
return $this->httpClient
->get($url)
->request('get', $url)

This comment has been minimized.

Copy link
@robbieaverill

robbieaverill Jul 23, 2019

Author Collaborator

get() is not a method on ClientInterface, it's a magic method on Client, so I've adjusted this to use the method that belongs to the interface (this is what is called by Client::get() by the way)

@robbieaverill robbieaverill force-pushed the robbieaverill:pulls/1.6/phpstan-fixes branch from 51e54a8 to 5352c68 Jul 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.