Skip to content

Commit 53692f9

Browse files
author
Alexandru Bucur
authored
Merge pull request #172 from Xethron/bugfix/psalmphp
Bugfix: Psalm - Fix parameter name
2 parents ed74031 + 1dda543 commit 53692f9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/MessageBird/Objects/SignedRequest.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -90,24 +90,24 @@ public static function create($query, $signature, $requestTimestamp, $body)
9090
* {@inheritdoc}
9191
* @throws ValidationException when a required parameter is missing.
9292
*/
93-
public function loadFromArray($params)
93+
public function loadFromArray($object)
9494
{
95-
if (!isset($params['requestTimestamp']) || !is_int($params['requestTimestamp'])) {
95+
if (!isset($object['requestTimestamp']) || !is_int($object['requestTimestamp'])) {
9696
throw new ValidationException('The "requestTimestamp" value is missing or invalid.');
9797
}
9898

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

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

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

111-
return parent::loadFromArray($params);
111+
return parent::loadFromArray($object);
112112
}
113113
}

0 commit comments

Comments
 (0)