Skip to content

Commit

Permalink
GitLabApi: Add "?" and final class.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek authored Oct 24, 2019
1 parent 4b84481 commit 322b6e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/GitLabApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Nette\Caching\IStorage;
use Nette\Security\User;

class GitLabApi
final class GitLabApi
{

/**
Expand Down Expand Up @@ -76,7 +76,7 @@ public function setCache(IStorage $IStorage): void
* @return ApiData|ApiData[]
* @throws GitLabApiException
*/
public function request(string $url, array $data = null, string $cache = '12 hours', string $token = null)
public function request(string $url, ?array $data = null, string $cache = '12 hours', ?string $token = null)
{
$token = $token ? : $this->token;
if ($this->validateToken === false) {
Expand Down Expand Up @@ -171,7 +171,7 @@ public function request(string $url, array $data = null, string $cache = '12 hou
* @return ApiData|ApiData[]
* @throws GitLabApiException
*/
public function changeRequest(string $url, array $data = null, string $method = 'PUT', string $token = null)
public function changeRequest(string $url, ?array $data = null, string $method = 'PUT', ?string $token = null)
{
$token = $token ? : $this->token;
if ($this->validateToken === false) {
Expand Down Expand Up @@ -308,4 +308,4 @@ private function mapToApiData($haystack)
return $haystack;
}

}
}

0 comments on commit 322b6e2

Please sign in to comment.