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

Bugfix: Psalm - Fix parameter name #172

Merged
merged 1 commit into from
May 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/MessageBird/Objects/SignedRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,24 @@ public static function create($query, $signature, $requestTimestamp, $body)
* {@inheritdoc}
* @throws ValidationException when a required parameter is missing.
*/
public function loadFromArray($params)
public function loadFromArray($object)
{
if (!isset($params['requestTimestamp']) || !is_int($params['requestTimestamp'])) {
if (!isset($object['requestTimestamp']) || !is_int($object['requestTimestamp'])) {
throw new ValidationException('The "requestTimestamp" value is missing or invalid.');
}

if (!isset($params['signature']) || !is_string($params['signature'])) {
if (!isset($object['signature']) || !is_string($object['signature'])) {
throw new ValidationException('The "signature" parameter is missing.');
}

if (!isset($params['queryParameters']) || !is_array($params['queryParameters'])) {
if (!isset($object['queryParameters']) || !is_array($object['queryParameters'])) {
throw new ValidationException('The "queryParameters" parameter is missing or invalid.');
}

if (!isset($params['body']) || !is_string($params['body'])) {
if (!isset($object['body']) || !is_string($object['body'])) {
throw new ValidationException('The "body" parameter is missing.');
}

return parent::loadFromArray($params);
return parent::loadFromArray($object);
}
}