Skip to content

Commit 322b6e2

Browse files
authored
GitLabApi: Add "?" and final class.
1 parent 4b84481 commit 322b6e2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/GitLabApi.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Nette\Caching\IStorage;
1111
use Nette\Security\User;
1212

13-
class GitLabApi
13+
final class GitLabApi
1414
{
1515

1616
/**
@@ -76,7 +76,7 @@ public function setCache(IStorage $IStorage): void
7676
* @return ApiData|ApiData[]
7777
* @throws GitLabApiException
7878
*/
79-
public function request(string $url, array $data = null, string $cache = '12 hours', string $token = null)
79+
public function request(string $url, ?array $data = null, string $cache = '12 hours', ?string $token = null)
8080
{
8181
$token = $token ? : $this->token;
8282
if ($this->validateToken === false) {
@@ -171,7 +171,7 @@ public function request(string $url, array $data = null, string $cache = '12 hou
171171
* @return ApiData|ApiData[]
172172
* @throws GitLabApiException
173173
*/
174-
public function changeRequest(string $url, array $data = null, string $method = 'PUT', string $token = null)
174+
public function changeRequest(string $url, ?array $data = null, string $method = 'PUT', ?string $token = null)
175175
{
176176
$token = $token ? : $this->token;
177177
if ($this->validateToken === false) {
@@ -308,4 +308,4 @@ private function mapToApiData($haystack)
308308
return $haystack;
309309
}
310310

311-
}
311+
}

0 commit comments

Comments
 (0)