Skip to content

Commit 297f04e

Browse files
committed
Fixes with phpcbf
1 parent a35a829 commit 297f04e

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

lib/Github/Api/Notification.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Notification extends AbstractApi
2727
*
2828
* @return array array of notifications
2929
*/
30-
public function all($includingRead = false, $participating = false, DateTime $since = null, DateTime $before = null)
30+
public function all($includingRead = false, $participating = false, ?DateTime $since = null, ?DateTime $before = null)
3131
{
3232
$parameters = [
3333
'all' => $includingRead,
@@ -54,7 +54,7 @@ public function all($includingRead = false, $participating = false, DateTime $si
5454
*
5555
* @param DateTime|null $since
5656
*/
57-
public function markRead(DateTime $since = null)
57+
public function markRead(?DateTime $since = null)
5858
{
5959
$parameters = [];
6060

lib/Github/Api/Repository/Actions/Workflows.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function usage(string $username, string $repository, $workflow)
7070
*
7171
* @return array|string empty
7272
*/
73-
public function dispatches(string $username, string $repository, $workflow, string $ref, array $inputs = null)
73+
public function dispatches(string $username, string $repository, $workflow, string $ref, ?array $inputs = null)
7474
{
7575
if (is_string($workflow)) {
7676
$workflow = rawurlencode($workflow);

lib/Github/Api/Repository/Contents.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function show($username, $repository, $path = null, $reference = null, $r
9898
*
9999
* @return array information about the new file
100100
*/
101-
public function create($username, $repository, $path, $content, $message, $branch = null, array $committer = null)
101+
public function create($username, $repository, $path, $content, $message, $branch = null, ?array $committer = null)
102102
{
103103
$url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents/'.rawurlencode($path);
104104

@@ -174,7 +174,7 @@ public function exists($username, $repository, $path, $reference = null)
174174
*
175175
* @return array information about the updated file
176176
*/
177-
public function update($username, $repository, $path, $content, $message, $sha, $branch = null, array $committer = null)
177+
public function update($username, $repository, $path, $content, $message, $sha, $branch = null, ?array $committer = null)
178178
{
179179
$url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents/'.rawurlencode($path);
180180

@@ -215,7 +215,7 @@ public function update($username, $repository, $path, $content, $message, $sha,
215215
*
216216
* @return array information about the updated file
217217
*/
218-
public function rm($username, $repository, $path, $message, $sha, $branch = null, array $committer = null)
218+
public function rm($username, $repository, $path, $message, $sha, $branch = null, ?array $committer = null)
219219
{
220220
$url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents/'.rawurlencode($path);
221221

lib/Github/Exception/ApiLimitExceedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ApiLimitExceedException extends RuntimeException
2020
* @param int $code
2121
* @param Throwable|null $previous
2222
*/
23-
public function __construct(int $limit = 5000, int $reset = 1800, int $code = 0, Throwable $previous = null)
23+
public function __construct(int $limit = 5000, int $reset = 1800, int $code = 0, ?Throwable $previous = null)
2424
{
2525
$this->limit = (int) $limit;
2626
$this->reset = (int) $reset;

lib/Github/Exception/MissingArgumentException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class MissingArgumentException extends ErrorException
1414
* @param int $code
1515
* @param Throwable|null $previous
1616
*/
17-
public function __construct($required, int $code = 0, Throwable $previous = null)
17+
public function __construct($required, int $code = 0, ?Throwable $previous = null)
1818
{
1919
if (is_string($required)) {
2020
$required = [$required];

lib/Github/Exception/SsoRequiredException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class SsoRequiredException extends RuntimeException
1414
* @param int $code
1515
* @param Throwable|null $previous
1616
*/
17-
public function __construct(string $url, int $code = 0, Throwable $previous = null)
17+
public function __construct(string $url, int $code = 0, ?Throwable $previous = null)
1818
{
1919
$this->url = $url;
2020

lib/Github/Exception/TwoFactorAuthenticationRequiredException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class TwoFactorAuthenticationRequiredException extends RuntimeException
1414
* @param int $code
1515
* @param Throwable|null $previous
1616
*/
17-
public function __construct(string $type, int $code = 0, Throwable $previous = null)
17+
public function __construct(string $type, int $code = 0, ?Throwable $previous = null)
1818
{
1919
$this->type = $type;
2020
parent::__construct('Two factor authentication is enabled on this account', $code, $previous);

0 commit comments

Comments
 (0)