Skip to content

Commit 5e906c0

Browse files
committed
Fix Report generator
1 parent 189c541 commit 5e906c0

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88

99
(Nothing yet)
1010

11+
## [0.9.1] - 2020-05-13
12+
13+
### Fixed
14+
15+
- Fixed generator introduced in 0.9.0.
16+
1117
## [0.9.0] - 2020-05-13
1218

1319
### Changed

spec/Analytics/ReportSpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function it_supports_resumption(Client $almaClient)
7171
SpecHelper::getDummyData('analytics_response_part3.xml')
7272
);
7373

74-
$this->count()->shouldBe(150 + 150 + 88);
74+
$this->shouldHaveCount(150 + 150 + 88);
7575
}
7676

7777
public function it_might_not_exist(Client $almaClient)

src/Model/PaginatedListGenerator.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ trait PaginatedListGenerator
1616
*/
1717
public function rewind()
1818
{
19-
throw new \Exception('Cannot rewind a generator that was already run');
19+
if ($this->position > 0) {
20+
throw new \Exception('Cannot rewind a generator that was already run');
21+
}
2022
}
2123

2224
/**

0 commit comments

Comments
 (0)