Skip to content

Commit

Permalink
Fix return type to match documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Nov 20, 2018
1 parent ed45089 commit 40a6201
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Cache/Engine/ArrayEngine.php
Expand Up @@ -94,7 +94,7 @@ public function increment($key, $offset = 1)
$key = $this->_key($key);
$this->data[$key][1] += $offset;

return true;
return $this->data[$key][1];
}

/**
Expand All @@ -112,7 +112,7 @@ public function decrement($key, $offset = 1)
$key = $this->_key($key);
$this->data[$key][1] -= $offset;

return true;
return $this->data[$key][1];
}

/**
Expand Down
8 changes: 4 additions & 4 deletions tests/TestCase/Cache/Engine/ArrayEngineTest.php
Expand Up @@ -158,16 +158,16 @@ public function testIncrement()
$this->assertTrue($result);

$result = Cache::increment('test_increment', 1, 'array');
$this->assertEquals(6, $result);
$this->assertSame(6, $result);

$result = Cache::read('test_increment', 'array');
$this->assertEquals(6, $result);
$this->assertSame(6, $result);

$result = Cache::increment('test_increment', 2, 'array');
$this->assertEquals(8, $result);
$this->assertSame(8, $result);

$result = Cache::read('test_increment', 'array');
$this->assertEquals(8, $result);
$this->assertSame(8, $result);
}

/**
Expand Down

0 comments on commit 40a6201

Please sign in to comment.