mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-27 01:02:41 +01:00
Fix implicitly nullable parameter declarations for PHP 8.4
Summary: Followup to rARC99e57a70. This patch should cover all remaining issues now that PHPStan covers it (instead of the previous trial-and-error approach). Implicitly nullable parameter declarations are deprecated in PHP 8.4: https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated The proposed syntax was introduced in PHP 7.1 and Phorge requires PHP 7.2 now. Test Plan: Run static code analysis. Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25831
This commit is contained in:
parent
99e57a7021
commit
29ca3df112
6 changed files with 9 additions and 9 deletions
|
@ -8,7 +8,7 @@ abstract class FutureProxy extends Future {
|
|||
|
||||
private $proxied;
|
||||
|
||||
public function __construct(Future $proxied = null) {
|
||||
public function __construct(?Future $proxied = null) {
|
||||
if ($proxied) {
|
||||
$this->setProxiedFuture($proxied);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ abstract class AASTNode extends Phobject {
|
|||
return $this->parentNode;
|
||||
}
|
||||
|
||||
final public function setParentNode(AASTNode $node = null) {
|
||||
final public function setParentNode(?AASTNode $node = null) {
|
||||
$this->parentNode = $node;
|
||||
return $this;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ abstract class AASTNode extends Phobject {
|
|||
return $this->previousSibling;
|
||||
}
|
||||
|
||||
final public function setPreviousSibling(AASTNode $node = null) {
|
||||
final public function setPreviousSibling(?AASTNode $node = null) {
|
||||
$this->previousSibling = $node;
|
||||
return $this;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ abstract class AASTNode extends Phobject {
|
|||
return $this->nextSibling;
|
||||
}
|
||||
|
||||
final public function setNextSibling(AASTNode $node = null) {
|
||||
final public function setNextSibling(?AASTNode $node = null) {
|
||||
$this->nextSibling = $node;
|
||||
return $this;
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ final class ArcanistMarkerRef
|
|||
return $this->getHardpoint(self::HARDPOINT_WORKINGCOPYSTATEREF);
|
||||
}
|
||||
|
||||
public function attachRemoteRef(ArcanistRemoteRef $ref = null) {
|
||||
public function attachRemoteRef(?ArcanistRemoteRef $ref = null) {
|
||||
return $this->attachHardpoint(self::HARDPOINT_REMOTEREF, $ref);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,11 +7,11 @@ final class ArcanistMercurialRepositoryMarkerQuery
|
|||
return $this->newMarkers();
|
||||
}
|
||||
|
||||
protected function newRemoteRefMarkers(ArcanistRemoteRef $remote = null) {
|
||||
protected function newRemoteRefMarkers(?ArcanistRemoteRef $remote = null) {
|
||||
return $this->newMarkers($remote);
|
||||
}
|
||||
|
||||
private function newMarkers(ArcanistRemoteRef $remote = null) {
|
||||
private function newMarkers(?ArcanistRemoteRef $remote = null) {
|
||||
$api = $this->getRepositoryAPI();
|
||||
|
||||
// In native Mercurial it is difficult to identify remote markers, and
|
||||
|
|
|
@ -111,7 +111,7 @@ final class ArcanistUnitTestResult extends Phobject {
|
|||
* "extra data" allows an implementation to store additional key/value
|
||||
* metadata along with the result of the test run.
|
||||
*/
|
||||
public function setExtraData(array $extra_data = null) {
|
||||
public function setExtraData(?array $extra_data = null) {
|
||||
$this->extraData = $extra_data;
|
||||
return $this;
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ abstract class ArcanistUnitTestEngine extends Phobject {
|
|||
return $this->enableCoverage;
|
||||
}
|
||||
|
||||
final public function setRenderer(ArcanistUnitRenderer $renderer = null) {
|
||||
final public function setRenderer(?ArcanistUnitRenderer $renderer = null) {
|
||||
$this->renderer = $renderer;
|
||||
return $this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue