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

This patch is far from complete.

Files: 
CommentFileSizeAuthor
#10 language_function_docs-1739592-10.patch846 bytesAlbert Volkman
PASSED: [[SimpleTest]]: [MySQL] 39,395 pass(es).
[ View ]
#7 language_function_docs-1739592-7.patch3.44 KBAlbert Volkman
PASSED: [[SimpleTest]]: [MySQL] 41,240 pass(es).
[ View ]
#7 interdiff.txt1.37 KBAlbert Volkman
#5 language_function_docs-1739592-5.patch3.43 KBAlbert Volkman
PASSED: [[SimpleTest]]: [MySQL] 41,085 pass(es).
[ View ]
#5 interdiff.txt512 bytesAlbert Volkman
#1 1739592-1.patch3.42 KBdexlab
PASSED: [[SimpleTest]]: [MySQL] 40,569 pass(es).
[ View ]
language-docs.patch2.72 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 40,573 pass(es).
[ View ]

Comments

dexlab’s picture

Assigned:Unassigned» dexlab
Status:Needs work» Needs review
StatusFileSize
new3.42 KB
PASSED: [[SimpleTest]]: [MySQL] 40,569 pass(es).
[ View ]

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
StatusFileSize
new512 bytes
new3.43 KB
PASSED: [[SimpleTest]]: [MySQL] 41,085 pass(es).
[ View ]

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
StatusFileSize
new1.37 KB
new3.44 KB
PASSED: [[SimpleTest]]: [MySQL] 41,240 pass(es).
[ View ]

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
StatusFileSize
new846 bytes
PASSED: [[SimpleTest]]: [MySQL] 39,395 pass(es).
[ View ]

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.