Skip to content

Commit db2c44d

Browse files
committed
Feedback from @michalkleiner
1 parent dba19c4 commit db2c44d

File tree

6 files changed

+13
-49
lines changed

6 files changed

+13
-49
lines changed

core/Updates/5.6.0-b2.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public function getMigrations(Updater $updater)
2929
{
3030
return [
3131
$this->migration->db->addColumn('segment', 'starred', 'TINYINT(1) NOT NULL DEFAULT 0'),
32+
$this->migration->db->addColumn('segment', 'starred_by', 'VARCHAR(100)'),
3233
];
3334
}
3435

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
@@ -353,9 +353,10 @@ public function add(
353353
* Stars a stored segment.
354354
*
355355
* @param int $idSegment
356+
* @return array{result: boolean, starred_by: string}
356357
* @throws Exception if the user is not logged in or does not have the required permissions.
357358
*/
358-
public function star(int $idSegment): ?array
359+
public function star(int $idSegment): array
359360
{
360361
$segment = $this->getSegmentOrFail($idSegment);
361362
$this->checkUserCanEditOrDeleteSegment($segment);
@@ -377,9 +378,10 @@ public function star(int $idSegment): ?array
377378
* Unstars a stored segment.
378379
*
379380
* @param int $idSegment
381+
* @return array{result: boolean}
380382
* @throws Exception if the user is not logged in or does not have the required permissions.
381383
*/
382-
public function unstar(int $idSegment): ?array
384+
public function unstar(int $idSegment): array
383385
{
384386
$segment = $this->getSegmentOrFail($idSegment);
385387
$this->checkUserCanEditOrDeleteSegment($segment);

plugins/SegmentEditor/tests/Integration/SegmentEditorTest.php

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

149149
$updatedSegment = array(
150-
'idsegment' => '' . $idSegment2,
150+
'idsegment' => (string) $idSegment2,
151151
'name' => 'NEW name',
152152
'definition' => 'searches==0',
153153
'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)