Skip to content

Commit 09de81b

Browse files
committed
cleaning up getters
1 parent 7abb614 commit 09de81b

17 files changed

+18
-201
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The Neo4j QueryAPI client is for developers and data engineers who want to inter
88
- Built and tested under close collaboration with the official Neo4j driver team
99
- Easier to start with, just need a client to any neo4j instance
1010
- Fully typed with Psalm and CS fixed for code quality
11-
- It does not Supports Bolt, Rather compatible with HTTP, and auto-routed drivers
11+
- It does not supports Bolt, Rather compatible with HTTP, and auto-routed drivers
1212

1313

1414

src/Neo4jQueryAPI.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Http\Discovery\Psr17FactoryDiscovery;
66
use Http\Discovery\Psr18ClientDiscovery;
7-
use http\Exception\RuntimeException;
87
use InvalidArgumentException;
98
use Neo4j\QueryAPI\Exception\Neo4jException;
109
use Psr\Http\Client\ClientInterface;

src/Objects/Authentication.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
use Neo4j\QueryAPI\Authentication\BearerAuthentication;
88
use Neo4j\QueryAPI\Authentication\NoAuth;
99

10-
/**
11-
* @api
12-
*/
1310
class Authentication
1411
{
1512
public static function basic(string $username, string $password): AuthenticateInterface
@@ -32,9 +29,6 @@ public static function fromEnvironment(): AuthenticateInterface
3229
);
3330
}
3431

35-
36-
37-
3832
public static function noAuth(): AuthenticateInterface
3933
{
4034
return new NoAuth();

src/Objects/Bookmarks.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44

55
use JsonSerializable;
66

7-
/**
8-
* @api
9-
*/
10-
class Bookmarks implements \Countable, JsonSerializable
7+
final class Bookmarks implements \Countable, JsonSerializable
118
{
129
public function __construct(private array $bookmarks)
1310
{

src/Objects/Node.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* Represents a Neo4j Node with labels and properties.
77
*/
88

9-
/**
10-
* @api
11-
*/
129
class Node
1310
{
1411
/**
@@ -35,7 +32,6 @@ public function __construct(array $labels, array $properties)
3532

3633
/**
3734
* Get the labels of the node.
38-
* @api
3935
* @return string[] Array of labels.
4036
*/
4137
public function getLabels(): array
@@ -45,7 +41,6 @@ public function getLabels(): array
4541

4642
/**
4743
* Get the properties of the node.
48-
* @api
4944
* @return array<string, mixed> Associative array of properties.
5045
*/
5146
public function getProperties(): array
@@ -55,7 +50,6 @@ public function getProperties(): array
5550

5651
/**
5752
* Convert the Node object to an array representation.
58-
* @api
5953
* @return array Node data as an array.
6054
*/
6155
public function toArray(): array

src/Objects/Path.php

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,17 @@
66
* Represents a path in a Neo4j graph, consisting of nodes and relationships.
77
*/
88

9-
/**
10-
* @api
11-
*/
129
class Path
1310
{
1411
/**
1512
* @var Node[] Array of nodes in the path.
1613
*/
17-
private array $nodes;
14+
public readonly array $nodes;
1815

1916
/**
2017
* @var Relationship[] Array of relationships in the path.
2118
*/
22-
private array $relationships;
19+
public readonly array $relationships;
2320

2421
/**
2522
* Path constructor.
@@ -33,23 +30,4 @@ public function __construct(array $nodes, array $relationships)
3330
$this->relationships = $relationships;
3431
}
3532

36-
/**
37-
* Get the nodes in the path.
38-
* @api
39-
* @return Node[] Array of nodes.
40-
*/
41-
public function getNodes(): array
42-
{
43-
return $this->nodes;
44-
}
45-
46-
/**
47-
* Get the relationships in the path.
48-
* @api
49-
* @return Relationship[] Array of relationships.
50-
*/
51-
public function getRelationships(): array
52-
{
53-
return $this->relationships;
54-
}
5533
}

src/Objects/Person.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* @psalm-suppress UnusedClass
77
* Represents a Person node in the Neo4j graph.
88
*/
9-
/**
10-
* @api
11-
*/
129
class Person extends Node
1310
{
1411
/**

src/Objects/Point.php

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
/**
66
* Represents a point with x, y, z coordinates, and SRID (Spatial Reference System Identifier).
77
*/
8-
/**
9-
* @api
10-
*/
11-
128
class Point
139
{
1410
/**
@@ -25,46 +21,6 @@ public function __construct(
2521
) {
2622
}
2723

28-
/**
29-
* Get the x coordinate of the point.
30-
* @api
31-
* @return float x coordinate value.
32-
*/
33-
public function getX(): float
34-
{
35-
return $this->x;
36-
}
37-
38-
/**
39-
* Get the y coordinate of the point.
40-
* @api
41-
* @return float y coordinate value.
42-
*/
43-
public function getY(): float
44-
{
45-
return $this->y;
46-
}
47-
48-
/**
49-
* Get the z coordinate of the point.
50-
* @api
51-
* @return float|null z coordinate value, or null if not applicable.
52-
*/
53-
public function getZ(): float|null
54-
{
55-
return $this->z;
56-
}
57-
58-
/**
59-
* Get the SRID (Spatial Reference System Identifier) of the point.
60-
* @api
61-
* @return int SRID value.
62-
*/
63-
public function getSrid(): int
64-
{
65-
return $this->srid;
66-
}
67-
6824
/**
6925
* Convert the Point object to a string representation.
7026
*

src/Objects/ProfiledQueryPlanArguments.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
namespace Neo4j\QueryAPI\Objects;
44

5-
/**
6-
* @api
7-
*/
85
class ProfiledQueryPlanArguments
96
{
107
public function __construct(

src/Objects/Relationship.php

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,17 @@
66
* Represents a relationship in a Neo4j graph, with a type and associated properties.
77
*/
88

9-
/**
10-
* @api
11-
*/
129
class Relationship
1310
{
1411
/**
1512
* @var string The type of the relationship (e.g., "FRIENDS_WITH", "WORKS_FOR").
1613
*/
17-
private string $type;
14+
public readonly string $type;
1815

1916
/**
2017
* @var array<string, mixed> Associative array of properties for the relationship.
2118
*/
22-
private array $properties;
19+
public readonly array $properties;
2320

2421
/**
2522
* Relationship constructor.
@@ -33,23 +30,4 @@ public function __construct(string $type, array $properties = [])
3330
$this->properties = $properties;
3431
}
3532

36-
/**
37-
* Get the type of the relationship.
38-
* @api
39-
* @return string The type of the relationship.
40-
*/
41-
public function getType(): string
42-
{
43-
return $this->type;
44-
}
45-
46-
/**
47-
* Get the properties of the relationship.
48-
* @api
49-
* @return array<string, mixed> Associative array of properties.
50-
*/
51-
public function getProperties(): array
52-
{
53-
return $this->properties;
54-
}
5533
}

0 commit comments

Comments
 (0)