{"id":606,"date":"2019-12-09T12:49:46","date_gmt":"2019-12-09T12:49:46","guid":{"rendered":"https:\/\/sdf-docs.mansystems.com\/docs\/acr-rules\/reliability\/variables-should-not-be-self-assigned\/"},"modified":"2020-03-20T08:44:58","modified_gmt":"2020-03-20T08:44:58","slug":"variableassignedtoself","status":"publish","type":"docs","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/variableassignedtoself","title":{"rendered":"Variables should not be self-assigned"},"content":{"rendered":"\n<p style=\"text-align:center\">Introduced in version: 1.3 (29 Jan 2020)<\/p>\n\n\n\n<p>There is no reason to re-assign a variable to itself. Either this statement is redundant and should be removed, or the re-assignment is a mistake and some other value or variable was intended for the assignment instead. <\/p>\n\n\n\n<p><strong>Noncompliant example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"517\" height=\"265\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2019\/12\/image-7.png\" alt=\"\" class=\"wp-image-608\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2019\/12\/image-7.png 517w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2019\/12\/image-7-480x246.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 517px, 100vw\" \/><\/figure>\n\n\n\n<p><strong>Compliant example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"513\" height=\"265\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2019\/12\/image-8.png\" alt=\"\" class=\"wp-image-609\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2019\/12\/image-8.png 513w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2019\/12\/image-8-480x248.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 513px, 100vw\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"507\" height=\"379\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2019\/12\/image-9.png\" alt=\"\" class=\"wp-image-610\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2019\/12\/image-9.png 507w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2019\/12\/image-9-480x359.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 507px, 100vw\" \/><\/figure>\n","protected":false},"featured_media":0,"parent":97,"menu_order":35,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-606","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/606"}],"collection":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=606"}],"version-history":[{"count":2,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/606\/revisions"}],"predecessor-version":[{"id":692,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/606\/revisions\/692"}],"up":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/97"}],"next":[{"title":"Microflow should allow concurrent access","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/concurentexecution","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/533"}],"prev":[{"title":"Variable CurrentUser should only be used in a user context","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/usersystemcontext","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/251"}],"wp:attachment":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=606"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}