Skip to content

Commit b8e2022

Browse files
committed
minor #124 Run tests also on PHP 7.1 and 7.2 (keradus)
This PR was squashed before being merged into the 1.0-dev branch (closes #124). Discussion ---------- Run tests also on PHP 7.1 and 7.2 Commits ------- 8fc5393 Log - add nullable type handling 3b38bda Run tests also on PHP 7.1 and 7.2
2 parents f144058 + 8fc5393 commit b8e2022

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ php:
77
- 5.5
88
- 5.6
99
- 7.0
10+
- 7.1
11+
- 7.2
1012
- hhvm
1113

1214
matrix:

src/Gitonomy/Git/Log.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Log implements \Countable, \IteratorAggregate
2626
protected $repository;
2727

2828
/**
29-
* @var array
29+
* @var null|RevisionList
3030
*/
3131
protected $revisions;
3232

@@ -221,7 +221,7 @@ public function getIterator()
221221
*/
222222
public function countCommits()
223223
{
224-
if (count($this->revisions)) {
224+
if (null !== $this->revisions && count($this->revisions)) {
225225
$output = $this->repository->run('rev-list', array_merge(array('--count'), $this->revisions->getAsTextArray(), array('--'), $this->paths));
226226
} else {
227227
$output = $this->repository->run('rev-list', array_merge(array('--count', '--all', '--'), $this->paths));

0 commit comments

Comments
 (0)