- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
+/** + * @file + */ +
The usual short description for a module is Hook implementations for the [module name] module. Using an empty comment is just a workaround.
- - // auto merge + // Auto merge
That comment is meaningless. Instead of fixing a word spelling, it would be better to remove the comment.
+/** + * Resolves conflicts on content entities. + */ class MergeRemoteStructure extends MergeStrategyBase {
That short description could be correct, but it needs to be more specific, as that class does not removed every content entity conflict.
- $local_paragraph_ids_unsorted = array_map(function ($value) {return $value['target_id'];}, $local_entity->get($property)->getValue()); - $server_paragraph_ids_unsorted = array_map(function ($value) {return $value['target_id'];}, $remote_entity->get($property)->getValue()); - $original_paragraph_ids_unsorted = array_map(function ($value) {return $value['target_id'];}, $original_entity->get($property)->getValue()); + $local_paragraph_ids_unsorted = array_map(function ($value) { + return $value['target_id']; + + }, $local_entity->get($property)->getValue()); + $server_paragraph_ids_unsorted = array_map(function ($value) { + return $value['target_id']; + + }, $remote_entity->get($property)->getValue()); + $original_paragraph_ids_unsorted = array_map(function ($value) { + return $value['target_id']; + + }, $original_entity->get($property)->getValue());
The changed code is not more readable.
- // TODO this supports only paragraphs at first level. + // @todo this supports only paragraphs at first level. if ($form_state) { $this->reorderWidgetState($field_item_list, $form_state);
What follows
@todo
is a sentence: It starts with a capitalized word and it ends with a period.- // TODO not yet supported. + // @todo not yet supported. if ($form_state) {
The sentence following
@todo
must describe what needs to be changed. In this case, it just describes the actual code.+/** + * Conflict Discovery Interface. + */
The short description is missing an article.
Those words are misspelled, since in English words are spelled capitalized basing on specific rules.+/** + * Discover conflicts on content entities. + */ class DefaultConflictDiscovery extends ConflictDiscoveryBase {
If the first word in a short description is a verb, it must use the third-person singular (eats, drinks, tastes.)
- First commit to issue fork.
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
Also, why only a ruleset is used instead of the two existing rulesets PHP_CodeSniffer has for Drupal?
- ๐ฎ๐ณIndia dev16.addweb
I've applied all patches but found some phpcs issues so I created with all fixes. Please review it.
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
apaderno โ changed the visibility of the branch 8.x-2.x to hidden.
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
The 8.x-2.x branch is not the recommended branch, which instead is the 3.0.x branch. Issues should be fixed in that branch.