Skip to content

Commit

Permalink
Remove redundant code.
Browse files Browse the repository at this point in the history
By initializing properties correctly in the class we can avoid method
calls to setup initial state.
  • Loading branch information
markstory committed May 23, 2018
1 parent 0e76d16 commit b34eb25
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/Database/Statement/BufferedStatement.php
Expand Up @@ -42,7 +42,7 @@ class BufferedStatement extends StatementDecorator
*
* @var bool
*/
protected $_allFetched = true;
protected $_allFetched = false;

/**
* Current record pointer
Expand All @@ -51,18 +51,6 @@ class BufferedStatement extends StatementDecorator
*/
protected $_counter = 0;

/**
* Constructor
*
* @param \Cake\Database\StatementInterface|null $statement Statement implementation such as PDOStatement
* @param \Cake\Database\Driver|null $driver Driver instance
*/
public function __construct($statement = null, $driver = null)
{
parent::__construct($statement, $driver);
$this->_reset();
}

/**
* Execute the statement and return the results.
*
Expand Down

0 comments on commit b34eb25

Please sign in to comment.