The docs in bootstrap.inc are not 100% documented, let's fix that.

This patch is far from complete.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

funex’s picture

Assigned: Unassigned » funex
Status: Needs work » Needs review
FileSize
3.42 KB

Added documentation to language_is_locked() and checked other language functions documentation.

FelixH’s picture

Im gonna review the patch.

FelixH’s picture

Status: Needs review » Reviewed & tested by the community

Tested if Patch does only modify commented parts.
Patch reviewed. Patch works and may be applied. Improving Docs may also be continued.

catch’s picture

Status: Reviewed & tested by the community » Needs work
+ * @return bool
+ *   1 if more than one language.

If it returns bool, shouldn't it return TRUE if more than one language instead of 1?

Albert Volkman’s picture

Status: Needs work » Needs review
FileSize
512 bytes
3.43 KB

Changed per @catch's suggestion. Also added missing space before @return.

Gábor Hojtsy’s picture

Status: Needs review » Needs work
+++ b/core/includes/bootstrap.incundefined
@@ -2696,6 +2700,9 @@ function language_types_get_default() {
+ * @return bool
+ *   TRUE if more than one language.

Should this be a sentence instead? ie. "is enabled" is missing at the end.

+++ b/core/includes/bootstrap.incundefined
@@ -2798,10 +2805,10 @@ function language_default_locked_languages($weight = 0) {
- * @return
+ * @return Drupal\core\Language\Language | false

Are we using lowercase FALSE when documenting return types? We use it uppercase in all other cases?!

Albert Volkman’s picture

Status: Needs work » Needs review
FileSize
1.37 KB
3.44 KB

Fixed those issues, and found a comment that was > 80 chars.

Gábor Hojtsy’s picture

Component: language.module » documentation
Status: Needs review » Reviewed & tested by the community

Looks good to me, let's place it with the docs component, so Jennifer will see it directly. Thanks all!

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. I'm undecided on backporting to 7.x... for the most part we don't have return/param types in 7.x at all, and some of the types here would not be right for 7.x anyway... but some of this patch could be useful maybe?

Albert Volkman’s picture

Status: Fixed » Needs review
FileSize
846 bytes

Yeah, a couple of hunks are still applicable.

Albert Volkman’s picture

Version: 8.x-dev » 7.x-dev
jhodgdon’s picture

Status: Needs review » Fixed

Thanks -- that patch is committed to 7.x.

Automatically closed -- issue fixed for 2 weeks with no activity.