original_string: private function from_notes(array $messages, $simple = true){
      if ( !empty($messages) ){
        foreach ( $messages as $idx => $mess ){
          if ( empty($mess['id_note']) ){
            unset($messages[$idx]);
            continue;
          }
          $note = $this->notes->get($mess['id_note']);
          $note = [
            'id' => $mess['id'],
            'title' => $note['title'],
            'content' => $note['content']
          ];
          if ( $simple ){
            $messages[$idx] = $note;
          }
          else {
            $messages[$idx] = \bbn\x::merge_arrays($messages[$idx], $note);
          }
        }
      }
      return $messages;
    }
code: private function from_notes(array $messages, $simple = true){
      if ( !empty($messages) ){
        foreach ( $messages as $idx => $mess ){
          if ( empty($mess['id_note']) ){
            unset($messages[$idx]);
            continue;
          }
          $note = $this->notes->get($mess['id_note']);
          $note = [
            'id' => $mess['id'],
            'title' => $note['title'],
            'content' => $note['content']
          ];
          if ( $simple ){
            $messages[$idx] = $note;
          }
          else {
            $messages[$idx] = \bbn\x::merge_arrays($messages[$idx], $note);
          }
        }
      }
      return $messages;
    }
code_tokens: private function from_notes ( array $ messages , $ simple = true ) { if ( ! empty ( $ messages ) ) { foreach ( $ messages as $ idx => $ mess ) { if ( empty ( $ mess [ 'id_note' ] ) ) { unset ( $ messages [ $ idx ] ) ; continue ; } $ note = $ this -> notes -> get ( $ mess [ 'id_note' ] ) ; $ note = [ 'id' => $ mess [ 'id' ] , 'title' => $ note [ 'title' ] , 'content' => $ note [ 'content' ] ] ; if ( $ simple ) { $ messages [ $ idx ] = $ note ; } else { $ messages [ $ idx ] = \ bbn \ x :: merge_arrays ( $ messages [ $ idx ] , $ note ) ; } } } return $ messages ; }
docstring: Gets internal messages' info from notes archive
  
  @param array $messages
  @param bool $simple
  @return array
docstring_tokens: Gets internal messages info from notes archive