API page: https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!Element!Ch...

At the end of the line

'#options' => array('SAT' => $this->t('SAT'), 'ACT' => $this->t('ACT'))),

only two parentheses are necessary instead of three.

Comments

mbrc created an issue. See original summary.

cilefen’s picture

Issue tags: +Novice
mayurjadhav’s picture

Assigned: Unassigned » mayurjadhav
mayurjadhav’s picture

Assigned: mayurjadhav » Unassigned
Status: Active » Needs review
Issue tags: +Quickfix
StatusFileSize
new609 bytes

Removed extra paranthesis.

pashupathi nath gajawada’s picture

Assigned: Unassigned » pashupathi nath gajawada
StatusFileSize
new614 bytes

Hi ,

As mentioned removed the extra paranthesis,
Please find the attached patch for the same.

Thanks,

mayurjadhav’s picture

I'm not sure whether to replace array() with [], but still uploaded both the changes.

ccjjmartin’s picture

Status: Needs review » Reviewed & tested by the community

#5 and #6 Both look good to me. No functional tests were performed by myself but it appears to have the right number of parentheses now.

Hiding patch 6.1 to keep consistency.

Not sure how credit is normally assigned in a situation like this. #5 was the first to correctly solve the issue but user in #6 attempted first (and got halfway there) ... I would think #5 would be committed.

Seeing as three people agree I am marking this as RTBC to prevent further bikeshedding.

ccjjmartin’s picture

Hiding #4 as it is incorrect.

ccjjmartin’s picture

Title: Too many closing parentheses in Checkboxes example » Too many closing parentheses in checkboxes example
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed e616701 and pushed to 8.1.x and 8.2.x. Thanks!

@ccjjmartin - wrt to credit we credit everyone who has worked on the issue.

  • alexpott committed 3d2798e on 8.2.x
    Issue #2747723 by mayurjadhav, pashupathi nath gajawada, ccjjmartin: Too...

  • alexpott committed e616701 on 8.1.x
    Issue #2747723 by mayurjadhav, pashupathi nath gajawada, ccjjmartin: Too...

Status: Fixed » Closed (fixed)

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