Skip to content

Commit 7abb614

Browse files
committed
removed getter from resultset
1 parent bb56797 commit 7abb614

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

src/Results/ResultSet.php

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ class ResultSet implements IteratorAggregate, Countable
2222
* @param list<ResultRow> $rows
2323
*/
2424
public function __construct(
25-
private readonly array $rows,
26-
private readonly ?ResultCounters $counters = null,
27-
private readonly Bookmarks $bookmarks,
28-
private readonly ?ProfiledQueryPlan $profiledQueryPlan,
29-
private readonly AccessMode $accessMode
25+
public readonly array $rows,
26+
public readonly ?ResultCounters $counters = null,
27+
public readonly Bookmarks $bookmarks,
28+
public readonly ?ProfiledQueryPlan $profiledQueryPlan,
29+
public readonly AccessMode $accessMode
3030
) {
3131
}
3232

@@ -44,14 +44,7 @@ public function getQueryCounters(): ?ResultCounters
4444
return $this->counters;
4545
}
4646

47-
public function getProfiledQueryPlan(): ?ProfiledQueryPlan
48-
{
49-
return $this->profiledQueryPlan;
50-
}
5147

52-
/**
53-
* @api
54-
*/
5548
#[\Override]
5649
public function count(): int
5750
{

tests/Integration/ProfiledQueryPlanIntegrationTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Neo4j\QueryAPI\Objects\ProfiledQueryPlan;
1414
use Neo4j\QueryAPI\OGM;
1515
use Neo4j\QueryAPI\ResponseParser;
16+
use Neo4j\QueryAPI\Results\ResultSet;
1617
use Nyholm\Psr7\Factory\Psr17Factory;
1718
use PHPUnit\Framework\TestCase;
1819

@@ -40,7 +41,7 @@ public function testProfileExistence(): void
4041
{
4142
$query = "PROFILE MATCH (n:Person) RETURN n.name";
4243
$result = $this->api->run($query);
43-
$this->assertNotNull($result->getProfiledQueryPlan(), "Profiled query plan not found");
44+
$this->assertNotNull($result->profiledQueryPlan, "Profiled query plan not found");
4445
}
4546

4647
public function testProfileCreateQueryExistence(): void
@@ -59,7 +60,7 @@ public function testProfileCreateQueryExistence(): void
5960
";
6061

6162
$result = $this->api->run($query);
62-
$this->assertNotNull($result->getProfiledQueryPlan(), "Profiled query plan not found");
63+
$this->assertNotNull($result->profiledQueryPlan, "Profiled query plan not found");
6364
}
6465

6566
public function testProfileCreateMovieQueryExistence(): void
@@ -77,7 +78,7 @@ public function testProfileCreateMovieQueryExistence(): void
7778
";
7879

7980
$result = $this->api->run($query);
80-
$this->assertNotNull($result->getProfiledQueryPlan(), "Profiled query plan not found");
81+
$this->assertNotNull($result->profiledQueryPlan, "Profiled query plan not found");
8182
}
8283

8384
public function testProfileCreateFriendsQueryExistence(): void
@@ -89,6 +90,6 @@ public function testProfileCreateFriendsQueryExistence(): void
8990
";
9091

9192
$result = $this->api->run($query);
92-
$this->assertNotNull($result->getProfiledQueryPlan(), "Profiled query plan not found");
93+
$this->assertNotNull($result->profiledQueryPlan, "Profiled query plan not found");
9394
}
9495
}

0 commit comments

Comments
 (0)