Skip to content

[3.x][PHP8.4] Deprecate implicitly nullable parameter types #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 3.x-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/AbstractGithubObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ abstract class AbstractGithubObject
*
* @since 1.0
*/
public function __construct(Registry $options = null, BaseHttp $client = null)
public function __construct(?Registry $options = null, ?BaseHttp $client = null)
{
$this->options = $options ?: new Registry();
$this->client = $client ?: (new HttpFactory())->getHttp($this->options);
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractPackage.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract class AbstractPackage extends AbstractGithubObject
*
* @since 1.0
*/
public function __construct(Registry $options = null, Http $client = null)
public function __construct(?Registry $options = null, ?Http $client = null)
{
parent::__construct($options, $client);

Expand Down
2 changes: 1 addition & 1 deletion src/Github.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Github
*
* @since 1.0
*/
public function __construct(Registry $options = null, Http $client = null)
public function __construct(?Registry $options = null, ?Http $client = null)
{
$this->options = $options ?: new Registry();

Expand Down
14 changes: 7 additions & 7 deletions src/Package/Activity/Notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Notifications extends AbstractPackage
*
* @since 1.0
*/
public function getList($all = true, $participating = true, \DateTimeInterface $since = null, \DateTimeInterface $before = null)
public function getList($all = true, $participating = true, ?\DateTimeInterface $since = null, ?\DateTimeInterface $before = null)
{
// Build the request path.
$path = '/notifications';
Expand Down Expand Up @@ -81,8 +81,8 @@ public function getListRepository(
$repo,
$all = true,
$participating = true,
\DateTimeInterface $since = null,
\DateTimeInterface $before = null
?\DateTimeInterface $since = null,
?\DateTimeInterface $before = null
) {
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/notifications';
Expand Down Expand Up @@ -116,13 +116,13 @@ public function getListRepository(
* @param boolean $unread Changes the unread status of the threads.
* @param boolean $read Inverse of “unread”.
* @param ?\DateTimeInterface $lastReadAt Describes the last point that notifications were checked.
* Anything updated since this time will not be updated. Default: Now. Expected in ISO 8601 format.
* Anything updated since this time will not be updated. Default: Now. Expected in ISO 8601 format.
*
* @return object
*
* @since 1.0
*/
public function markRead($unread = true, $read = true, \DateTimeInterface $lastReadAt = null)
public function markRead($unread = true, $read = true, ?\DateTimeInterface $lastReadAt = null)
{
// Build the request path.
$path = '/notifications';
Expand Down Expand Up @@ -152,13 +152,13 @@ public function markRead($unread = true, $read = true, \DateTimeInterface $lastR
* @param boolean $unread Changes the unread status of the threads.
* @param boolean $read Inverse of “unread”.
* @param ?\DateTimeInterface $lastReadAt Describes the last point that notifications were checked.
* Anything updated since this time will not be updated. Default: Now. Expected in ISO 8601 format.
* Anything updated since this time will not be updated. Default: Now. Expected in ISO 8601 format.
*
* @return object
*
* @since 1.0
*/
public function markReadRepository($owner, $repo, $unread, $read, \DateTimeInterface $lastReadAt = null)
public function markReadRepository($owner, $repo, $unread, $read, ?\DateTimeInterface $lastReadAt = null)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/notifications';
Expand Down
6 changes: 3 additions & 3 deletions src/Package/Gists.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public function getList($page = 0, $limit = 0)
* @since 1.0
* @throws \DomainException
*/
public function getListByUser($user, $page = 0, $limit = 0, \DateTime $since = null)
public function getListByUser($user, $page = 0, $limit = 0, ?\DateTime $since = null)
{
// Build the request path.
$uri = $this->fetchUrl('/users/' . $user . '/gists', $page, $limit);
Expand All @@ -256,7 +256,7 @@ public function getListByUser($user, $page = 0, $limit = 0, \DateTime $since = n
* @since 1.0
* @throws \DomainException
*/
public function getListPublic($page = 0, $limit = 0, \DateTime $since = null)
public function getListPublic($page = 0, $limit = 0, ?\DateTime $since = null)
{
// Build the request path.
$uri = $this->fetchUrl('/gists/public', $page, $limit);
Expand All @@ -281,7 +281,7 @@ public function getListPublic($page = 0, $limit = 0, \DateTime $since = null)
* @since 1.0
* @throws \DomainException
*/
public function getListStarred($page = 0, $limit = 0, \DateTime $since = null)
public function getListStarred($page = 0, $limit = 0, ?\DateTime $since = null)
{
// Build the request path.
$uri = $this->fetchUrl('/gists/starred', $page, $limit);
Expand Down
4 changes: 2 additions & 2 deletions src/Package/Issues.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function getList(
$labels = null,
$sort = null,
$direction = null,
\DateTimeInterface $since = null,
?\DateTimeInterface $since = null,
$page = 0,
$limit = 0
) {
Expand Down Expand Up @@ -256,7 +256,7 @@ public function getListByRepository(
$labels = null,
$sort = null,
$direction = null,
\DateTimeInterface $since = null,
?\DateTimeInterface $since = null,
$page = 0,
$limit = 0
) {
Expand Down
4 changes: 2 additions & 2 deletions src/Package/Issues/Comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Comments extends AbstractPackage
* @since 1.0
* @throws \DomainException
*/
public function getList($owner, $repo, $issueId, $page = 0, $limit = 0, \DateTimeInterface $since = null)
public function getList($owner, $repo, $issueId, $page = 0, $limit = 0, ?\DateTimeInterface $since = null)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/issues/' . (int) $issueId . '/comments';
Expand Down Expand Up @@ -68,7 +68,7 @@ public function getList($owner, $repo, $issueId, $page = 0, $limit = 0, \DateTim
* @throws \UnexpectedValueException
* @throws \DomainException
*/
public function getRepositoryList($owner, $repo, $sort = 'created', $direction = 'asc', \DateTimeInterface $since = null)
public function getRepositoryList($owner, $repo, $sort = 'created', $direction = 'asc', ?\DateTimeInterface $since = null)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/issues/comments';
Expand Down
2 changes: 1 addition & 1 deletion src/Package/Repositories/Commits.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Commits extends AbstractPackage
* @since 1.0
* @throws \DomainException
*/
public function getList($user, $repo, $sha = '', $path = '', $author = '', \DateTimeInterface $since = null, \DateTimeInterface $until = null)
public function getList($user, $repo, $sha = '', $path = '', $author = '', ?\DateTimeInterface $since = null, ?\DateTimeInterface $until = null)
{
// Build the request path.
$rPath = '/repos/' . $user . '/' . $repo . '/commits';
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy