original_string: public function readOne($primary)
      {
          if (!$primary) {
              return $this->getTable()::create();
          }
  
          $row = $this->getTable()::findRow($primary);
  
          if (!$row) {
              throw new NotFoundException('Record not found');
          }
  
          $row = $this->filterRow($row);
  
          return $row;
      }
code: public function readOne($primary)
      {
          if (!$primary) {
              return $this->getTable()::create();
          }
  
          $row = $this->getTable()::findRow($primary);
  
          if (!$row) {
              throw new NotFoundException('Record not found');
          }
  
          $row = $this->filterRow($row);
  
          return $row;
      }
code_tokens: public function readOne ( $ primary ) { if ( ! $ primary ) { return $ this -> getTable ( ) :: create ( ) ; } $ row = $ this -> getTable ( ) :: findRow ( $ primary ) ; if ( ! $ row ) { throw new NotFoundException ( 'Record not found' ) ; } $ row = $ this -> filterRow ( $ row ) ; return $ row ; }
docstring: Get record from Db or create new object
  
  @param  mixed $primary
  
  @return Db\RowInterface
  @throws TableNotFoundException
  @throws NotFoundException
docstring_tokens: Get record from Db or create new object