original_string: public function getAllLastVersion()
  	{
  		$qb = $this->createQueryBuilder('p');
  		$qb->where('p.original IS NULL AND p.state=:state')
  			->setParameter(':state', DocumentModel::STATE_PUBLISHED);
  		
  		$result = $qb->getQuery()->getResult();
  		$return = array();
  		foreach($result as $original) {
  			$return[] = $this->getLastVersion($original->getId());
  		}
  		return $return;
  	}
code: public function getAllLastVersion()
  	{
  		$qb = $this->createQueryBuilder('p');
  		$qb->where('p.original IS NULL AND p.state=:state')
  			->setParameter(':state', DocumentModel::STATE_PUBLISHED);
  		
  		$result = $qb->getQuery()->getResult();
  		$return = array();
  		foreach($result as $original) {
  			$return[] = $this->getLastVersion($original->getId());
  		}
  		return $return;
  	}
code_tokens: public function getAllLastVersion ( ) { $ qb = $ this -> createQueryBuilder ( 'p' ) ; $ qb -> where ( 'p.original IS NULL AND p.state=:state' ) -> setParameter ( ':state' , DocumentModel :: STATE_PUBLISHED ) ; $ result = $ qb -> getQuery ( ) -> getResult ( ) ; $ return = array ( ) ; foreach ( $ result as $ original ) { $ return [ ] = $ this -> getLastVersion ( $ original -> getId ( ) ) ; } return $ return ; }
docstring: Get all posts in their last version
docstring_tokens: Get all posts in their last version