Download & Extend

Apply Code Standard to Drupal\Core\Config\Config

Project:Drupal core
Version:8.x-dev
Component:documentation
Category:task
Priority:normal
Assigned:Unassigned
Status:needs work
Issue tags:Configuration system

Issue Summary

Update documentation definition for functions

Comments

#1

AttachmentSizeStatusTest resultOperations
drupal-config_code_standard-1793990-1.patch5.49 KBIdlePASSED: [[SimpleTest]]: [MySQL] 41,486 pass(es).View details | Re-test

#2

Component:configuration system» documentation
Status:needs review» needs work
Issue tags:+Configuration system

Thanks for this patch, I miss the @return values in config greatly.

Please remove the @return on castValue, it's an array or a string not a string but hopefully #1653026: All configuration values are stored as strings will fix that for once and all.

Past that the only problem I see here is the wording on get() -- I will think on it.

#3

Component:documentation» configuration system
Status:needs work» needs review
Issue tags:-Configuration system

Leave castValue alone for now

AttachmentSizeStatusTest resultOperations
drupal-config_code_standard-1793990-2.patch5.2 KBIdlePASSED: [[SimpleTest]]: [MySQL] 41,483 pass(es).View details | Re-test

#4

Component:configuration system» documentation
Status:needs review» needs work
Issue tags:+Configuration system

#5

Status:needs work» needs review

#6

Status:needs review» needs work

This can't be right:

/**
    * Returns the name of this configuration object.
+   *
+   * @return Drupal\Core\Config\Config
+   *   The configuration object.
    */
   public function getName() {

Either the first line or the added @return is incorrect. I didn't look through the rest of the patch, but it looks like it was just generated by pasting the same @return for each function -- it needs to be done a bit more carefully. Thanks!

#7

Status:needs work» needs review

Fixed documentation on getName().

AttachmentSizeStatusTest resultOperations
drupal-config_code_standard-1793990-7.patch5.19 KBIdlePASSED: [[SimpleTest]]: [MySQL] 41,449 pass(es).View details | Re-test

#8

Status:needs review» reviewed & tested by the community

This looks good to me now and thanks for the work enzo and socketwench!

#9

Assigned to:Anonymous» jhodgdon

Jennifer's got this one. :)

#10

Status:reviewed & tested by the community» needs work

I've committed this patch, as everything in it looks good.

But the file is not still up to our coding standards... As a follow-up, would someone like to go through and fix these items:

a) Berb tense in the function first lines? For instance:

  /**
   * Dispatch a config event.
   */
  protected function notify($config_event_name) {

Should be Dispatches. There are several others that should be fixed.

b) In the get() method, the explanation should go before the @param, not between the @param and the @return, and the @see should go at the end.

c) There are also a couple of minor wording/grammar things that could be fixed, such as:

  /**
   * Sets value in this config object.

Should be "Sets a value...".

d) The castValue() method needs a @return but doesn't have one (it has two @params, and I think the second should be @return).

e) After this patch, not all the param/returns have data types. still.

#11

Assigned to:jhodgdon» Anonymous

Oh, not my issue now. :)

#12

Do not try to fix d). castValue is scheduled to be removed, it's an abomination, so please disregard that one.

#13

I'll try to update the patch after work today.

nobody click here