Skip to content

Commit

Permalink
Replace docblocks with {@inheritdoc}
Browse files Browse the repository at this point in the history
  • Loading branch information
Baachi committed Jun 20, 2012
1 parent 692e0ca commit 76530e8
Showing 1 changed file with 13 additions and 51 deletions.
64 changes: 13 additions & 51 deletions lib/Doctrine/KeyValueStore/Storage/RiakStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,81 +34,57 @@ class RiakStorage implements Storage
*/
protected $client;

/**
* @var string
*/
protected $bucketName;

/**
* Constructor
*
* @param \Riak\Client $riak
* @param string $bucketName
*/
public function __construct(Client $riak, $bucketName)
public function __construct(Client $riak)
{
$this->client = $riak;
$this->bucketName = $bucketName;
}

/**
* Determine if the storage supports updating only a subset of properties,
* or if all properties have to be set, even if only a subset of properties
* changed.
*
* @return bool
* {@inheritDoc}
*/
public function supportsPartialUpdates()
{
return false;
}

/**
* Does this storage support composite primary keys?
*
* @return bool
* {@inheritDoc}
*/
public function supportsCompositePrimaryKeys()
{
return false;
}

/**
* Does this storage require composite primary keys?
*
* @return bool
* {@inheritDoc}
*/
public function requiresCompositePrimaryKeys()
{
return false;
}

/**
* Insert data into the storage key specified.
*
* @param string $storageName
* @param array|string $key
* @param array $data
* @return void
* {@inheritDoc}
*/
public function insert($storageName, $key, array $data)
{
$bucket = $this->client->bucket($this->bucketName);
$bucket = $this->client->bucket($storageName);
$object = $bucket->newObject($key, $data);
$object->store();
}

/**
* Update data into the given key.
*
* @param string $storageName
* @param array|string $key
* @param array $data
* @return void
* {@inheritDoc}
*/
public function update($storageName, $key, array $data)
{
$bucket = $this->client->bucket($this->bucketName);
$bucket = $this->client->bucket($storageName);
/** @var $object \Riak\Object */
$object = $bucket->get($key);

Expand All @@ -117,15 +93,11 @@ public function update($storageName, $key, array $data)
}

/**
* Delete data at key
*
* @param string $storageName
* @param array|string $key
* @return void
* {@inheritDoc}
*/
public function delete($storageName, $key)
{
$bucket = $this->client->bucket($this->bucketName);
$bucket = $this->client->bucket($storageName);

/** @var $object \Riak\Object */
$object = $bucket->get($key);
Expand All @@ -139,19 +111,11 @@ public function delete($storageName, $key)
}

/**
* Find data at key
*
* Important note: The returned array does contain the identifier (again)!
*
* @throws Doctrine\KeyValueStore\NotFoundException When data with key is not found.
*
* @param string $storageName
* @param array|string $key
* @return array
* {@inheritDoc}
*/
public function find($storageName, $key)
{
$bucket = $this->client->bucket($this->bucketName);
$bucket = $this->client->bucket($storageName);

/** @var $object \Riak\Object */
$object = $bucket->get($key);
Expand All @@ -164,9 +128,7 @@ public function find($storageName, $key)
}

/**
* Return a name of the underlying storage.
*
* @return string
* {@inheritDoc}
*/
public function getName()
{
Expand Down

0 comments on commit 76530e8

Please sign in to comment.