Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
https://www.drupal.org/node/1354#return
was saying
The @return tag is followed by an optional data type indicator, and then a newline. The following paragraph is considered by the API module to be documentation.
We know mentioning data type is optional, every where drupal follows as * @return array
but in 5 places it uses * @return array()
File : core/lib/Drupal/Core/Field/FormatterInterface.php
function - settingsSummary()
File : core/modules/block_content/block_content.module
function - block_content_add_body_field($block_type_id, $label = 'Body')
Comment | File | Size | Author |
---|---|---|---|
#24 | 2594041-7.patch | 1.83 KB | krknth |
#5 | 2594041-2.patch | 2.66 KB | krknth |
#2 | 2594041-1.patch | 2.66 KB | krknth |
Comments
Comment #2
krknth CreditAttribution: krknth as a volunteer commentedAttached patch
Comment #3
krknth CreditAttribution: krknth as a volunteer commentedComment #4
Chi CreditAttribution: Chi commentedThe return documentation lines should be ending in a period.
Comment #5
krknth CreditAttribution: krknth as a volunteer commentedFixed @Chi comment
Attached new patch.
Comment #7
Chi CreditAttribution: Chi commentedLooks good for me.
Comment #8
tstoecklerWe should not be changing vendor code.
Feel free to open an upstream pull request for Symfony and Twig, though! ;-)
Comment #9
krknth CreditAttribution: krknth as a volunteer commented@tstoeckler : removed for vendor code.
patch attached
Comment #10
tstoecklerYay, back to RTBC. Thanks @krknth!
Comment #11
alexpottThis would be more helpful if it was
string[]
as it is an array of strings that are joined together to make a summary.This is not an array it is an instance of FieldConfig.
Comment #12
krknth CreditAttribution: krknth as a volunteer and at Valuebound commentedHi @alexpott,
Updated your comments
Attached new patch
Comment #13
krknth CreditAttribution: krknth as a volunteer and at Valuebound commentedComment #15
krknth CreditAttribution: krknth as a volunteer and at Valuebound commentedComment #16
krknth CreditAttribution: krknth as a volunteer and at Valuebound commentedComment #18
Chi CreditAttribution: Chi commented'Body field' should remain on the next line.
BTW, does it need to be prepended with 'A' or 'The'?
Comment #19
krknth CreditAttribution: krknth as a volunteer and at Valuebound commentedHi @Chi,
Actually i referred from core/modules/node/node.module file :(
So now updated in both files with
* The Body field.
as new line.Not sure about 'A' or 'The', But i used 'The'.
Comment #20
krknth CreditAttribution: krknth as a volunteer and at Valuebound commentedComment #22
Chi CreditAttribution: Chi commented@krknth, you might find it useful.
https://www.drupal.org/node/2585781#comment-10458727
Comment #23
krknth CreditAttribution: krknth as a volunteer and at Valuebound commentedComment #24
krknth CreditAttribution: krknth as a volunteer and at Valuebound commentedImproved comment block as suggested by @Chi
needs review
Comment #25
cilefen CreditAttribution: cilefen commentedThis issue needs a title update and an issue summary update to explain its purpose for the documentation maintainer.
Comment #26
Chi CreditAttribution: Chi commentedLooks good for me.
Comment #28
Chi CreditAttribution: Chi commentedComment #29
alexpottCommitted 99c0b88 and pushed to 8.0.x. Thanks!
Comment #32
N.kishorekumar CreditAttribution: N.kishorekumar as a volunteer and at Valuebound commented