Skip to content

Commit dfb572d

Browse files
authored
[5.2] Cleanup of return types for phpstan (#43350)
* Cleanup of return types * Return nothing instead of an empty string * Update OverridesModel.php
1 parent 4c4f5b5 commit dfb572d

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

administrator/components/com_admin/script.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3002,7 +3002,7 @@ private function migrateTinymceConfiguration(): bool
30023002
/**
30033003
* setup Guided Tours Unique Identifiers
30043004
*
3005-
* @return boolean True on success
3005+
* @return void
30063006
*
30073007
* @since 5.0.0
30083008
*/

administrator/components/com_categories/src/Model/CategoryModel.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,8 @@ public function publish(&$pks, $value = 1)
752752

753753
return true;
754754
}
755+
756+
return false;
755757
}
756758

757759
/**

administrator/components/com_languages/src/Model/OverridesModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function delete($cids)
233233
/**
234234
* Removes all of the cached strings from the table.
235235
*
236-
* @return boolean result of operation
236+
* @return void|\RuntimeException
237237
*
238238
* @since 3.4.2
239239
*/

administrator/components/com_menus/src/Controller/MenuController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ public function save($key = null, $urlVar = null)
180180
$this->setRedirect(Route::_('index.php?option=com_menus&view=menus', false));
181181
break;
182182
}
183+
184+
return true;
183185
}
184186

185187
/**

administrator/components/com_modules/src/Controller/ModuleController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public function save($key = null, $urlVar = null)
258258
/**
259259
* Method to get the other modules in the same position
260260
*
261-
* @return string The data for the Ajax request.
261+
* @return void
262262
*
263263
* @since 3.6.3
264264
*/
@@ -303,7 +303,7 @@ public function orderPosition()
303303
} catch (\RuntimeException $e) {
304304
$app->enqueueMessage($e->getMessage(), 'error');
305305

306-
return '';
306+
return;
307307
}
308308

309309
$orders2 = [];

0 commit comments

Comments
 (0)