Commit 73347e1c authored by catch's avatar catch

Issue #2722699 by anoopjohn, mfernea, Mile23, martin107: Fix...

Issue #2722699 by anoopjohn, mfernea, Mile23, martin107: Fix Drupal.Commenting.FunctionComment.InvalidReturnNotVoid
parent a0546923
......@@ -1810,10 +1810,11 @@ function _install_module_batch($module, $module_name, &$context) {
* @param string $server_pattern
* Server access pattern (to replace language code, version number, etc. in).
*
* @return array
* @return array|null
* Requirements compliance array. If the translation was downloaded
* successfully then an empty array is returned. Otherwise the requirements
* error with detailed information.
* error with detailed information. NULL if the file already exists for this
* language code.
*/
function install_check_translations($langcode, $server_pattern) {
$requirements = [];
......
......@@ -630,8 +630,9 @@ public static function datePad($value, $size = 2) {
* - timezone: (optional) String timezone name. Defaults to the timezone
* of the date object.
*
* @return string
* The formatted value of the date.
* @return string|null
* The formatted value of the date or NULL if there were construction
* errors.
*/
public function format($format, $settings = []) {
......
......@@ -246,9 +246,6 @@ public function render() {
/**
* Gets the title of the page.
*
* @return string
* A string title of the page.
*/
protected function getTitle() {
return;
......
......@@ -298,8 +298,9 @@ public function eventDetails($event_id) {
/**
* Builds a query for database log administration filters based on session.
*
* @return array
* An associative array with keys 'where' and 'args'.
* @return array|null
* An associative array with keys 'where' and 'args' or NULL if there were
* no filters set.
*/
protected function buildFilterQuery() {
if (empty($_SESSION['dblog_overview_filter'])) {
......
......@@ -525,8 +525,8 @@ public function testForumWithNewPost() {
* @param bool $container
* TRUE if $forum is a container; FALSE otherwise.
*
* @return object
* The created topic node.
* @return object|null
* The created topic node or NULL if the forum is a container.
*/
public function createForumTopic($forum, $container = FALSE) {
// Generate a random subject/body.
......
......@@ -772,9 +772,10 @@ function simpletest_mail_alter(&$message) {
* @param $phpunit_xml_file
* Path to the PHPUnit XML file.
*
* @return array[]
* @return array[]|null
* The results as array of rows in a format that can be inserted into
* {simpletest}.
* {simpletest}. If the phpunit_xml_file does not have any contents then the
* function will return NULL.
*/
function simpletest_phpunit_xml_to_rows($test_id, $phpunit_xml_file) {
$contents = @file_get_contents($phpunit_xml_file);
......
......@@ -90,8 +90,10 @@ public function assertModuleTablesDoNotExist($module) {
* @param string $module
* The name of the module.
*
* @return bool
* TRUE if configuration has been installed, FALSE otherwise.
* @return bool|null
* TRUE if configuration has been installed, FALSE otherwise. Returns NULL
* if the module configuration directory does not exist or does not contain
* any configuration files.
*/
public function assertModuleConfig($module) {
$module_config_dir = drupal_get_path('module', $module) . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY;
......
......@@ -87,8 +87,10 @@ public function assertModuleTablesDoNotExist($module) {
* @param string $module
* The name of the module.
*
* @return bool
* TRUE if configuration has been installed, FALSE otherwise.
* @return bool|null
* TRUE if configuration has been installed, FALSE otherwise. Returns NULL
* if the module configuration directory does not exist or does not contain
* any configuration files.
*/
public function assertModuleConfig($module) {
$module_config_dir = drupal_get_path('module', $module) . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY;
......
......@@ -53,7 +53,6 @@
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php">
<exclude name="Drupal.Commenting.FunctionComment.IncorrectTypeHint"/>
<exclude name="Drupal.Commenting.FunctionComment.InvalidNoReturn"/>
<exclude name="Drupal.Commenting.FunctionComment.InvalidReturnNotVoid"/>
<exclude name="Drupal.Commenting.FunctionComment.InvalidTypeHint"/>
<exclude name="Drupal.Commenting.FunctionComment.Missing"/>
<exclude name="Drupal.Commenting.FunctionComment.MissingParamComment"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment