original_string: protected function handleResult(array $result)
      {
          if ($this->onlyCount && isset($result[0]) && is_array($result[0])) {
              return (int)current($result[0]);
          }
  
          $entities = [];
          foreach ($result as $row) {
              $model = clone $this->getModel();
              $model->populate($row);
              $entities[] = $model;
          }
          return $entities;
      }
code: protected function handleResult(array $result)
      {
          if ($this->onlyCount && isset($result[0]) && is_array($result[0])) {
              return (int)current($result[0]);
          }
  
          $entities = [];
          foreach ($result as $row) {
              $model = clone $this->getModel();
              $model->populate($row);
              $entities[] = $model;
          }
          return $entities;
      }
code_tokens: protected function handleResult ( array $ result ) { if ( $ this -> onlyCount && isset ( $ result [ 0 ] ) && is_array ( $ result [ 0 ] ) ) { return ( int ) current ( $ result [ 0 ] ) ; } $ entities = [ ] ; foreach ( $ result as $ row ) { $ model = clone $ this -> getModel ( ) ; $ model -> populate ( $ row ) ; $ entities [ ] = $ model ; } return $ entities ; }
docstring: Handle the result of one of the get functions. This attempts to create a new model
  with the values returned properly set.
  
  @param array $result
  
  @return \Parable\ORM\Model[]|int
docstring_tokens: Handle the result of one of the get functions . This attempts to create a new model with the values returned properly set .