Skip to content

Commit

Permalink
PHP 5.3 FTW
Browse files Browse the repository at this point in the history
  • Loading branch information
baldurrensch committed Mar 26, 2015
1 parent 6d544c0 commit 88adf20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Storage/PDOStorageAdapter.php
Expand Up @@ -51,10 +51,10 @@ public function get($key)
*/
public function set($key, $value)
{
if ($this->get($key)) {
$sql = self::STMT_UPDATE;
} else {
if (null === $this->get($key)) {
$sql = self::STMT_INSERT;
} else {
$sql = self::STMT_UPDATE;
}

$statement = $this->pdoConnection->prepare($this->getSQLStatement($sql));
Expand Down
4 changes: 2 additions & 2 deletions tests/Storage/PDOStorageAdapterTest.php
Expand Up @@ -19,7 +19,7 @@ public function testGet()

$statement->expects($this->once())
->method('fetch')
->willReturn(['settings' => 'success']);
->willReturn(array('settings' => 'success'));

$pdo = $this->mockPDO($this->prepareSQL(PDOStorageAdapter::STMT_SELECT), $statement);

Expand Down Expand Up @@ -70,7 +70,7 @@ public function testSetUpdate()
$getStatement = $this->mockPDOStatement();
$getStatement->expects($this->once())
->method('fetch')
->willReturn(['settings' => 'success']);
->willReturn(array('settings' => 'success'));

$setStatement = $this->mockPDOStatement();
$setStatement->expects($this->at(1))
Expand Down

0 comments on commit 88adf20

Please sign in to comment.