Skip to content

Commit

Permalink
Fixes with phpcbf
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Sep 23, 2024
1 parent a35a829 commit 297f04e
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lib/Github/Api/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Notification extends AbstractApi
*
* @return array array of notifications
*/
public function all($includingRead = false, $participating = false, DateTime $since = null, DateTime $before = null)
public function all($includingRead = false, $participating = false, ?DateTime $since = null, ?DateTime $before = null)
{
$parameters = [
'all' => $includingRead,
Expand All @@ -54,7 +54,7 @@ public function all($includingRead = false, $participating = false, DateTime $si
*
* @param DateTime|null $since
*/
public function markRead(DateTime $since = null)
public function markRead(?DateTime $since = null)
{
$parameters = [];

Expand Down
2 changes: 1 addition & 1 deletion lib/Github/Api/Repository/Actions/Workflows.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function usage(string $username, string $repository, $workflow)
*
* @return array|string empty
*/
public function dispatches(string $username, string $repository, $workflow, string $ref, array $inputs = null)
public function dispatches(string $username, string $repository, $workflow, string $ref, ?array $inputs = null)
{
if (is_string($workflow)) {
$workflow = rawurlencode($workflow);
Expand Down
6 changes: 3 additions & 3 deletions lib/Github/Api/Repository/Contents.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function show($username, $repository, $path = null, $reference = null, $r
*
* @return array information about the new file
*/
public function create($username, $repository, $path, $content, $message, $branch = null, array $committer = null)
public function create($username, $repository, $path, $content, $message, $branch = null, ?array $committer = null)
{
$url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents/'.rawurlencode($path);

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

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

Expand Down
2 changes: 1 addition & 1 deletion lib/Github/Exception/ApiLimitExceedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ApiLimitExceedException extends RuntimeException
* @param int $code
* @param Throwable|null $previous
*/
public function __construct(int $limit = 5000, int $reset = 1800, int $code = 0, Throwable $previous = null)
public function __construct(int $limit = 5000, int $reset = 1800, int $code = 0, ?Throwable $previous = null)
{
$this->limit = (int) $limit;
$this->reset = (int) $reset;
Expand Down
2 changes: 1 addition & 1 deletion lib/Github/Exception/MissingArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class MissingArgumentException extends ErrorException
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($required, int $code = 0, Throwable $previous = null)
public function __construct($required, int $code = 0, ?Throwable $previous = null)
{
if (is_string($required)) {
$required = [$required];
Expand Down
2 changes: 1 addition & 1 deletion lib/Github/Exception/SsoRequiredException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SsoRequiredException extends RuntimeException
* @param int $code
* @param Throwable|null $previous
*/
public function __construct(string $url, int $code = 0, Throwable $previous = null)
public function __construct(string $url, int $code = 0, ?Throwable $previous = null)
{
$this->url = $url;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TwoFactorAuthenticationRequiredException extends RuntimeException
* @param int $code
* @param Throwable|null $previous
*/
public function __construct(string $type, int $code = 0, Throwable $previous = null)
public function __construct(string $type, int $code = 0, ?Throwable $previous = null)
{
$this->type = $type;
parent::__construct('Two factor authentication is enabled on this account', $code, $previous);
Expand Down

0 comments on commit 297f04e

Please sign in to comment.