I'm scanning the codebase with PHPStorm's code analysis tools tonight and I found three instances of the "Silly Arguments" rule where we are assigning a variable itself. I don't have any idea why were doing this so I thought I'd roll up a patch to test it.

In the case of the two issues I found in the date module I changed to logic so that the "silly argument" wasn't needed.

Files: 
CommentFileSizeAuthor
#1 SillyArguments.patch2.23 KBcosmicdreams
PASSED: [[SimpleTest]]: [MySQL] 58,848 pass(es).
[ View ]

Comments

StatusFileSize
new2.23 KB
PASSED: [[SimpleTest]]: [MySQL] 58,848 pass(es).
[ View ]

Status:Active» Needs review

Status:Needs review» Needs work

The last submitted patch, SillyArguments.patch, failed testing.

Component:documentation» other
Status:Needs work» Reviewed & tested by the community

This is not a docs issue. Test failure looks like a random glitch though. I'll hit retest. The patch appears fine to me, so if the tests pass, it should be good to go.

#1: SillyArguments.patch queued for re-testing.

Status:Reviewed & tested by the community» Needs work

The last submitted patch, SillyArguments.patch, failed testing.

Status:Needs work» Needs review

#1: SillyArguments.patch queued for re-testing.

Status:Needs review» Reviewed & tested by the community

Failed because of #2057401: Make the node entity database schema sensible - should be fine now.

Status:Reviewed & tested by the community» Needs work

The last submitted patch, SillyArguments.patch, failed testing.

Status:Needs work» Needs review

#1: SillyArguments.patch queued for re-testing.

Status:Needs review» Needs work

The last submitted patch, SillyArguments.patch, failed testing.

Status:Needs work» Needs review

#1: SillyArguments.patch queued for re-testing.

Looks like we're good then? RTBC?

Status:Needs review» Reviewed & tested by the community

+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/OverviewTerms.php
@@ -428,7 +428,6 @@ public function submitForm(array &$form, array &$form_state) {
     for ($weight; $weight < count($tree); $weight++) {
       $term = $tree[$weight];
       if ($term->parent->value == 0 && $term->weight->value != $weight) {
-        $term->parent->value = $term->parent->value;
         $term->weight->value = $weight;
         $changed_terms[$term->id()] = $term;
       }

This might actually indicate a bug, so we shouldn't just remove it.

I know that re-ordering terms currently doesn't work and this might be the reason for it.

Status:Reviewed & tested by the community» Needs review

Setting to needs review for now. I think there's a issue about the broken order stuff somewhere, maybe just cross-reference the issues and remove that part?

Do you mean: #941266: Order of terms with same weight messed up after saving? Or can you find the issue you are referring to?