original_string: public function copy(string $id_menu, string $id_menu_to, array $cfg): ?string
    {
      if (
        \bbn\str::is_uid($id_menu) &&
        \bbn\str::is_uid($id_menu_to) &&
        ($bits = $this->pref->get_full_bits($id_menu)) &&
        ($id = $this->add($id_menu_to, $cfg)) &&
        $this->_clone($id_menu_to, $bits, $id)
      ){
        return $id;
      }
      return null;
    }
code: public function copy(string $id_menu, string $id_menu_to, array $cfg): ?string
    {
      if (
        \bbn\str::is_uid($id_menu) &&
        \bbn\str::is_uid($id_menu_to) &&
        ($bits = $this->pref->get_full_bits($id_menu)) &&
        ($id = $this->add($id_menu_to, $cfg)) &&
        $this->_clone($id_menu_to, $bits, $id)
      ){
        return $id;
      }
      return null;
    }
code_tokens: public function copy ( string $ id_menu , string $ id_menu_to , array $ cfg ) : ? string { if ( \ bbn \ str :: is_uid ( $ id_menu ) && \ bbn \ str :: is_uid ( $ id_menu_to ) && ( $ bits = $ this -> pref -> get_full_bits ( $ id_menu ) ) && ( $ id = $ this -> add ( $ id_menu_to , $ cfg ) ) && $ this -> _clone ( $ id_menu_to , $ bits , $ id ) ) { return $ id ; } return null ; }
docstring: Copies a menu into another one.
  
  @param string $id The menu's ID to copy
  @param string $id_menu_to The target menu's ID
  @param array $cfg
  @return null|string The new ID
docstring_tokens: Copies a menu into another one .