diff --git a/src/future/FutureProxy.php b/src/future/FutureProxy.php index d7e00cd61..e16b9a1b3 100644 --- a/src/future/FutureProxy.php +++ b/src/future/FutureProxy.php @@ -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); } diff --git a/src/parser/aast/api/AASTNode.php b/src/parser/aast/api/AASTNode.php index 7b20224a6..a5f76c4d0 100644 --- a/src/parser/aast/api/AASTNode.php +++ b/src/parser/aast/api/AASTNode.php @@ -42,7 +42,7 @@ final public function getParentNode() { 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 @@ final public function getPreviousSibling() { 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 @@ final public function getNextSibling() { return $this->nextSibling; } - final public function setNextSibling(AASTNode $node = null) { + final public function setNextSibling(?AASTNode $node = null) { $this->nextSibling = $node; return $this; } diff --git a/src/parser/argument/PhutilArgumentParser.php b/src/parser/argument/PhutilArgumentParser.php index 6391fd837..76796241a 100644 --- a/src/parser/argument/PhutilArgumentParser.php +++ b/src/parser/argument/PhutilArgumentParser.php @@ -490,7 +490,7 @@ public function parseWorkflowsFull(array $workflows) { if ($workflow->isExecutable()) { $workflow->setArgv($this); $err = $workflow->execute($this); - exit($err); + exit((int)$err); } else { return $workflow; } diff --git a/src/repository/marker/ArcanistMarkerRef.php b/src/repository/marker/ArcanistMarkerRef.php index bc196c59a..d8ec78111 100644 --- a/src/repository/marker/ArcanistMarkerRef.php +++ b/src/repository/marker/ArcanistMarkerRef.php @@ -174,7 +174,7 @@ public function getWorkingCopyStateRef() { 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); } diff --git a/src/repository/marker/ArcanistMercurialRepositoryMarkerQuery.php b/src/repository/marker/ArcanistMercurialRepositoryMarkerQuery.php index 998df0dca..c6690be7c 100644 --- a/src/repository/marker/ArcanistMercurialRepositoryMarkerQuery.php +++ b/src/repository/marker/ArcanistMercurialRepositoryMarkerQuery.php @@ -7,11 +7,11 @@ protected function newLocalRefMarkers() { 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 diff --git a/src/unit/ArcanistUnitTestResult.php b/src/unit/ArcanistUnitTestResult.php index ec25c20f3..f94e1733d 100644 --- a/src/unit/ArcanistUnitTestResult.php +++ b/src/unit/ArcanistUnitTestResult.php @@ -111,7 +111,7 @@ public function getUserData() { * "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; } diff --git a/src/unit/engine/ArcanistUnitTestEngine.php b/src/unit/engine/ArcanistUnitTestEngine.php index b54bafea5..aae1fc8e6 100644 --- a/src/unit/engine/ArcanistUnitTestEngine.php +++ b/src/unit/engine/ArcanistUnitTestEngine.php @@ -78,7 +78,7 @@ final public function getEnableCoverage() { return $this->enableCoverage; } - final public function setRenderer(ArcanistUnitRenderer $renderer = null) { + final public function setRenderer(?ArcanistUnitRenderer $renderer = null) { $this->renderer = $renderer; return $this; } diff --git a/support/init/init-arcanist.php b/support/init/init-arcanist.php index c0a04568f..d8dc15c13 100644 --- a/support/init/init-arcanist.php +++ b/support/init/init-arcanist.php @@ -5,4 +5,4 @@ $runtime = new ArcanistRuntime(); $err = $runtime->execute($argv); -exit($err); +exit((int)$err);