Skip to content

Commit cb5dcf7

Browse files
committed
Add fix for #40, which allows getAll to refresh token as it's being called
1 parent cb94754 commit cb5dcf7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Api/Client.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,10 @@ public function __call($verb, $args)
170170
}
171171

172172
// For "getAll", set page to 1 & change verb to "get", otherwise, no page
173-
($verb === 'getAll') ? $this->page = 1 && $verb = 'get' : $this->page = 0;
173+
if ($verb === 'getAll') {
174+
$this->page = 1;
175+
$verb = 'get';
176+
}
174177

175178
if (!in_array($verb, $this->verbs)) {
176179
throw new InvalidArgumentException(sprintf("Unsupported verb [%s] was requested.", $verb));

0 commit comments

Comments
 (0)