Fix invalid return values for void

Summary: Remove or correct wrong @return types in PHPDoc and/or correct wrong return values in methods.

Test Plan: Run static code analysis; read code; check method in parent class and other callers, etc.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25979
This commit is contained in:
Andre Klapper 2025-04-29 14:19:22 +03:00
parent 44c7bfb42d
commit c51002398d
8 changed files with 2 additions and 11 deletions

View file

@ -169,7 +169,7 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker {
* acquire the lease.
*
* @param DrydockLease $lease Requested lease.
* @return void
* @return DrydockResource
* @task allocator
*/
private function executeAllocator(DrydockLease $lease) {

View file

@ -531,8 +531,6 @@ final class PhabricatorMetaMTAMail
/**
* Attempt to deliver an email immediately, in this process.
*
* @return void
*/
public function sendNow() {
if ($this->getStatus() != PhabricatorMailOutboundStatus::STATUS_QUEUE) {

View file

@ -34,8 +34,6 @@ final class PhabricatorPeopleUserEmailPHIDType
$email = $objects[$phid];
$handle->setName($email->getAddress());
}
return null;
}
}

View file

@ -105,7 +105,6 @@ final class PhabricatorSearchDocumentQuery
protected function nextPage(array $page) {
// We already updated the internal offset in `loadPage()` after loading
// results, so we do not need to make any additional state updates here.
return $this;
}
}

View file

@ -794,7 +794,6 @@ abstract class PhabricatorCustomField extends Phobject {
* query.
* @param PhabricatorCursorPagedPolicyAwareQuery $query Query to constrain.
* @param wild $value Constraint provided by the user.
* @return void
* @task appsearch
*/
public function applyApplicationSearchConstraintToQuery(
@ -818,7 +817,6 @@ abstract class PhabricatorCustomField extends Phobject {
* form.
* @param AphrontFormView $form The form to update.
* @param wild $value Value from the saved query.
* @return void
* @task appsearch
*/
public function appendToApplicationSearchForm(

View file

@ -48,7 +48,7 @@ final class PhabricatorCustomFieldList extends Phobject {
*
* @param PhabricatorCustomFieldInterface $object Object to read field values
* for.
* @return void
* @return $this
*/
public function readFieldsFromStorage(
PhabricatorCustomFieldInterface $object) {

View file

@ -74,7 +74,6 @@ final class PhabricatorWorkerTriggerQuery
// (Before T13266, we raised an exception here, but since "nextPage()" is
// now called even if we don't page we can't do that anymore. Just do
// nothing instead.)
return null;
}
protected function loadPage() {

View file

@ -86,7 +86,6 @@ final class PhabricatorWorkerTrigger
* is the first execution.
* @param int $this_event Scheduled epoch of this execution. This may not be
* the same as the current time.
* @return void
*/
public function executeTrigger($last_event, $this_event) {
return $this->getAction()->execute($last_event, $this_event);