Skip to content

Commit

Permalink
* fix naming isWrited >> isWritten
Browse files Browse the repository at this point in the history
  • Loading branch information
till committed Apr 9, 2011
1 parent 1bbfa46 commit 239a6b3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions library/Rediska/Command/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ abstract class Rediska_Command_Abstract implements Rediska_Command_Interface
*
* @var unknown_type
*/
protected $_isWrited = false;
protected $_isWritten = false;

/**
* Is queued to transaction
Expand Down Expand Up @@ -135,7 +135,7 @@ public function write()
$exec->write();
}

$this->_isWrited = true;
$this->_isWritten = true;

return true;
}
Expand All @@ -149,7 +149,7 @@ public function read()
{
$responses = array();

if (!$this->_isWrited) {
if (!$this->_isWritten) {
throw new Rediska_Command_Exception('You need write before');
}

Expand All @@ -162,7 +162,7 @@ public function read()

return true;
} else {
$this->_isWrited = false;
$this->_isWritten = false;
return $this->parseResponses($responses);
}
}
Expand Down Expand Up @@ -411,4 +411,4 @@ protected function _throwExceptionIfNotSupported($version = null)
throw new Rediska_Command_Exception("Command '{$this->_name}' requires {$version}+ version of Redis server. Current version is {$redisVersion}. To change it specify 'redisVersion' option.");
}
}
}
}
16 changes: 8 additions & 8 deletions library/Rediska/Connection/Exec.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ class Rediska_Connection_Exec
/**
* Is writed
*
* @var $_isWrited string
* @var $_isWritten boolean
*/
protected $_isWrited = false;
protected $_isWritten = false;

/**
* Response callback
Expand Down Expand Up @@ -84,7 +84,7 @@ public function __construct(Rediska_Connection $connection, $command)
public function write()
{
$result = $this->getConnection()->write($this->getCommand());
$this->_isWrited = true;
$this->_isWritten = true;

return $result;
}
Expand All @@ -94,9 +94,9 @@ public function write()
*
* @return boolean
*/
public function isWrited()
public function isWritten()
{
return $this->_isWrited;
return $this->_isWritten;
}

/**
Expand All @@ -106,11 +106,11 @@ public function isWrited()
*/
public function read()
{
if (!$this->isWrited()) {
if (!$this->isWritten()) {
throw new Rediska_Connection_Exec_Exception('You must write command before read');
}

$this->_isWrited = false;
$this->_isWritten = false;

if ($this->getResponseIterator() !== null) {
if ($this->getResponseIterator() === true) {
Expand Down Expand Up @@ -304,4 +304,4 @@ public static function readResponseFromConnection(Rediska_Connection $connection
throw new Rediska_Connection_Exec_Exception("Invalid reply type: '$type'");
}
}
}
}

0 comments on commit 239a6b3

Please sign in to comment.