Skip to content

Commit bc86de7

Browse files
committed
Merge branch '2.3'
2 parents 955b60f + 0619aab commit bc86de7

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ jobs:
142142
name: Run PHPUnit tests
143143
command: |-
144144
mkdir -p build/logs/tmp build/cov
145-
find tests -name '*Test.php' | circleci tests split --split-by=timings | parallel -j10% --rpl '{_} s/\//_/g;' \
145+
circleci tests glob "tests/**/*Test.php" | circleci tests split --split-by=timings | parallel -j10% --rpl '{_} s/\//_/g;' \
146146
phpdbg -qrr vendor/bin/phpunit --coverage-php build/cov/coverage-{_}.cov --log-junit build/logs/tmp/{_}.xml --colors=always {}
147147
- run:
148148
name: Merge PHPUnit test reports

src/DataPersister/ChainDataPersister.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,9 @@ public function persist($data)
5151
{
5252
foreach ($this->persisters as $persister) {
5353
if ($persister->supports($data)) {
54-
$data = $persister->persist($data) ?? $data;
54+
return $persister->persist($data) ?? $data;
5555
}
5656
}
57-
58-
return $data;
5957
}
6058

6159
/**

tests/DataPersister/ChainDataPersisterTest.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,7 @@ public function testPersist()
6060
$barPersisterProphecy->supports($dummy)->willReturn(true)->shouldBeCalled();
6161
$barPersisterProphecy->persist($dummy)->shouldBeCalled();
6262

63-
$bazPersisterProphecy = $this->prophesize(DataPersisterInterface::class);
64-
$bazPersisterProphecy->supports($dummy)->willReturn(true)->shouldBeCalled();
65-
$bazPersisterProphecy->persist($dummy)->shouldBeCalled();
66-
67-
(new ChainDataPersister([
68-
$fooPersisterProphecy->reveal(),
69-
$barPersisterProphecy->reveal(),
70-
$bazPersisterProphecy->reveal(),
71-
]))->persist($dummy);
63+
(new ChainDataPersister([$fooPersisterProphecy->reveal(), $barPersisterProphecy->reveal()]))->persist($dummy);
7264
}
7365

7466
public function testRemove()

0 commit comments

Comments
 (0)