Skip to content

Commit 370de48

Browse files
committed
Update docblock for Client::setApiVersion
Expected parameter should be a string, not a float.
1 parent 88cbc82 commit 370de48

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/Bitbucket/API/Http/ClientInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function getApiVersion();
109109
* Supported versions: 1.0, 2.0
110110
*
111111
* @access public
112-
* @param float $version
112+
* @param string $version
113113
* @return $this
114114
*
115115
* @throws \InvalidArgumentException If invalid API version is provided

test/Bitbucket/Tests/API/Http/ClientTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,13 @@ public function testResponseFormatSuccess()
4343
}
4444

4545
/**
46+
* @dataProvider invalidApiVersionsProvider
4647
* @expectedException \InvalidArgumentException
48+
* @ticket 57
4749
*/
48-
public function testSetApiVersionInvalid()
50+
public function testSetApiVersionInvalid($version)
4951
{
50-
$this->client->setApiVersion('1.1.1');
52+
$this->client->setApiVersion($version);
5153
}
5254

5355
public function testApiVersionSuccess()
@@ -217,7 +219,7 @@ private function getListenerMock($name = 'dummy')
217219
public function invalidApiVersionsProvider()
218220
{
219221
return [
220-
['3.1'], ['1,2'], ['1,0'], ['2.1'], ['4'], [2], ['string'], [new \stdClass()]
222+
['3.1'], ['1,2'], ['1,0'], ['2.1'], ['4'], [2], ['string'], [2.0]
221223
];
222224
}
223225
}

0 commit comments

Comments
 (0)