Skip to content

Commit 6520de3

Browse files
authored
Merge pull request #80 from ianrodrigues/typed-properties
type properties + arrow function
2 parents 04b5372 + 7e25c81 commit 6520de3

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

.travis.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
language: php
22

33
php:
4-
- 7.2
5-
- 7.3
6-
- nightly
4+
- 7.4snapshot
75

86
env:
97
matrix:
108
- COMPOSER_FLAGS="--prefer-lowest"
119
- COMPOSER_FLAGS=""
1210

13-
matrix:
14-
allow_failures:
15-
- php: nightly
16-
1711
before_script:
1812
- travis_retry composer self-update
1913
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source
2014

2115
script:
2216
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
17+
18+
after_script:
19+
- php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
}
2121
],
2222
"require": {
23-
"php": "^7.2",
23+
"php": "^7.4",
2424
"ext-dom": "*",
25-
"phpunit/phpunit": "^8.0",
25+
"phpunit/phpunit": "^8.3",
2626
"symfony/yaml": "^4.0|^5.0"
2727
},
2828
"autoload": {

src/MatchesSnapshots.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@
1313

1414
trait MatchesSnapshots
1515
{
16-
/** @var int */
17-
protected $snapshotIncrementor;
16+
protected int $snapshotIncrementor = 0;
1817

19-
/** @var string[] */
20-
protected $snapshotChanges;
18+
protected array $snapshotChanges = [];
2119

2220
/** @before */
2321
public function setUpSnapshotIncrementor()
@@ -38,9 +36,7 @@ public function markTestIncompleteIfSnapshotsHaveChanged()
3836
return;
3937
}
4038

41-
$formattedMessages = implode(PHP_EOL, array_map(function (string $message) {
42-
return "- {$message}";
43-
}, $this->snapshotChanges));
39+
$formattedMessages = implode(PHP_EOL, array_map(fn(string $message) => "- {$message}", $this->snapshotChanges));
4440

4541
$this->markTestIncomplete($formattedMessages);
4642
}

0 commit comments

Comments
 (0)