original_string: public static function findByPk($values, $options)
  	{
  		$options['conditions'] = static::pkConditions($values);
  		$list = static::table()->find($options);
  		$results = count($list);
  
  		if ($results != ($expected = count($values)))
  		{
  			$class = get_called_class();
  
  			if ($expected == 1)
  			{
  				if (!is_array($values))
  					$values = array($values);
  
  				throw new RecordNotFound("Couldn't find $class with ID=" . join(',',$values));
  			}
  
  			$values = join(',',$values);
  			throw new RecordNotFound("Couldn't find all $class with IDs ($values) (found $results, but was looking for $expected)");
  		}
  		return $expected == 1 ? $list[0] : $list;
  	}
code: public static function findByPk($values, $options)
  	{
  		$options['conditions'] = static::pkConditions($values);
  		$list = static::table()->find($options);
  		$results = count($list);
  
  		if ($results != ($expected = count($values)))
  		{
  			$class = get_called_class();
  
  			if ($expected == 1)
  			{
  				if (!is_array($values))
  					$values = array($values);
  
  				throw new RecordNotFound("Couldn't find $class with ID=" . join(',',$values));
  			}
  
  			$values = join(',',$values);
  			throw new RecordNotFound("Couldn't find all $class with IDs ($values) (found $results, but was looking for $expected)");
  		}
  		return $expected == 1 ? $list[0] : $list;
  	}
code_tokens: public static function findByPk ( $ values , $ options ) { $ options [ 'conditions' ] = static :: pkConditions ( $ values ) ; $ list = static :: table ( ) -> find ( $ options ) ; $ results = count ( $ list ) ; if ( $ results != ( $ expected = count ( $ values ) ) ) { $ class = get_called_class ( ) ; if ( $ expected == 1 ) { if ( ! is_array ( $ values ) ) $ values = array ( $ values ) ; throw new RecordNotFound ( "Couldn't find $class with ID=" . join ( ',' , $ values ) ) ; } $ values = join ( ',' , $ values ) ; throw new RecordNotFound ( "Couldn't find all $class with IDs ($values) (found $results, but was looking for $expected)" ) ; } return $ expected == 1 ? $ list [ 0 ] : $ list ; }
docstring: Finder method which will find by a single or array of primary keys for this model.
  
  @see find
  @param array $values An array containing values for the pk
  @param array $options An options array
  @return Model
  @throws {@link RecordNotFound} if a record could not be found
docstring_tokens: Finder method which will find by a single or array of primary keys for this model .