Skip to content

Commit db692f1

Browse files
committed
Feedback from @michalkleiner
1 parent e466c74 commit db692f1

File tree

5 files changed

+12
-49
lines changed

5 files changed

+12
-49
lines changed

core/Updates/5.6.0-b3.php

Lines changed: 0 additions & 39 deletions
This file was deleted.

core/Version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ final class Version
2222
* The current Matomo version.
2323
* @var string
2424
*/
25-
public const VERSION = '5.6.0-b3';
25+
public const VERSION = '5.6.0-b2';
2626

2727
public const MAJOR_VERSION = 5;
2828

plugins/SegmentEditor/API.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,10 @@ public function add(
354354
* Stars a stored segment.
355355
*
356356
* @param int $idSegment
357+
* @return array{result: boolean, starred_by: string}
357358
* @throws Exception if the user is not logged in or does not have the required permissions.
358359
*/
359-
public function star(int $idSegment): ?array
360+
public function star(int $idSegment): array
360361
{
361362
$segment = $this->getSegmentOrFail($idSegment);
362363
$this->checkUserCanEditOrDeleteSegment($segment);
@@ -378,9 +379,10 @@ public function star(int $idSegment): ?array
378379
* Unstars a stored segment.
379380
*
380381
* @param int $idSegment
382+
* @return array{result: boolean}
381383
* @throws Exception if the user is not logged in or does not have the required permissions.
382384
*/
383-
public function unstar(int $idSegment): ?array
385+
public function unstar(int $idSegment): array
384386
{
385387
$segment = $this->getSegmentOrFail($idSegment);
386388
$this->checkUserCanEditOrDeleteSegment($segment);

plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function testUpdateSegment()
149149
$this->clearReArchiveList();
150150

151151
$updatedSegment = array(
152-
'idsegment' => '' . $idSegment2,
152+
'idsegment' => (string) $idSegment2,
153153
'name' => 'NEW name',
154154
'definition' => 'searches==0',
155155
'hash' => md5('searches==0'),

plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ describe("SegmentSelectorEditorTest", function () {
4646
expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('1_selector_open');
4747
});
4848

49-
it("should unstar all segments", async function() {
50-
await page.click('.segmentList li:nth-child(2) .starSegment');
51-
await page.click('.segmentList li:nth-child(3) .starSegment');
52-
await page.click('.segmentList li:nth-child(4) .starSegment');
53-
expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('1_selector_unstarred');
54-
});
49+
it("should unstar all segments", async function() {
50+
await page.click('.segmentList li:nth-child(2) .starSegment');
51+
await page.click('.segmentList li:nth-child(3) .starSegment');
52+
await page.click('.segmentList li:nth-child(4) .starSegment');
53+
expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('1_selector_unstarred');
54+
});
5555

5656
it("should star last segment", async function() {
5757
await page.click('.segmentList li:last-child .starSegment');

0 commit comments

Comments
 (0)