original_string: public function correctParents($oldSubmodulesParentUid, $newSubmodulesParentUid)
      {
          if ($oldSubmodulesParentUid === $newSubmodulesParentUid) return;
  
          $query = static::find()->where(['like', 'parent_uid', "{$oldSubmodulesParentUid}%", false]);
          $list = $query->all();
          foreach ($list as $item) {
              if (0 === strpos($item->parent_uid, $oldSubmodulesParentUid)) {
                  $item->parent_uid = $newSubmodulesParentUid
                      . mb_substr($item->parent_uid, mb_strlen($oldSubmodulesParentUid));
                  $item->save();
              }
          }
      }
code: public function correctParents($oldSubmodulesParentUid, $newSubmodulesParentUid)
      {
          if ($oldSubmodulesParentUid === $newSubmodulesParentUid) return;
  
          $query = static::find()->where(['like', 'parent_uid', "{$oldSubmodulesParentUid}%", false]);
          $list = $query->all();
          foreach ($list as $item) {
              if (0 === strpos($item->parent_uid, $oldSubmodulesParentUid)) {
                  $item->parent_uid = $newSubmodulesParentUid
                      . mb_substr($item->parent_uid, mb_strlen($oldSubmodulesParentUid));
                  $item->save();
              }
          }
      }
code_tokens: public function correctParents ( $ oldSubmodulesParentUid , $ newSubmodulesParentUid ) { if ( $ oldSubmodulesParentUid === $ newSubmodulesParentUid ) return ; $ query = static :: find ( ) -> where ( [ 'like' , 'parent_uid' , "{$oldSubmodulesParentUid}%" , false ] ) ; $ list = $ query -> all ( ) ; foreach ( $ list as $ item ) { if ( 0 === strpos ( $ item -> parent_uid , $ oldSubmodulesParentUid ) ) { $ item -> parent_uid = $ newSubmodulesParentUid . mb_substr ( $ item -> parent_uid , mb_strlen ( $ oldSubmodulesParentUid ) ) ; $ item -> save ( ) ; } } }
docstring: Correct parent_uid chain if module-container change it's own name or container
docstring_tokens: Correct parent_uid chain if module - container change it s own name or container