Skip to content

Commit 035a4ab

Browse files
committed
updated code
2 parents 122a01c + 8d3af70 commit 035a4ab

15 files changed

+62
-296
lines changed

php-cs-fixer.phar

3.1 MB
Binary file not shown.

psalm.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
errorLevel="7"
4+
resolveFromConfigFile="true"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xmlns="https://getpsalm.org/schema/config"
7+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8+
findUnusedBaselineEntry="true"
9+
findUnusedCode="true"
10+
>
11+
<projectFiles>
12+
<directory name="src" />
13+
<ignoreFiles>
14+
<directory name="vendor" />
15+
</ignoreFiles>
16+
</projectFiles>
17+
</psalm>

src/Exception/Neo4jException.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
use Exception;
66

7+
8+
/**
9+
* @api
10+
*/
11+
712
class Neo4jException extends Exception
813
{
914
private readonly string $errorCode;
@@ -28,14 +33,12 @@ public function __construct(
2833
parent::__construct($message, $statusCode, $previous);
2934
}
3035

31-
/**
32-
* Get the Neo4j error code associated with this exception.
33-
*/
3436
public function getErrorCode(): string
3537
{
3638
return $this->errorCode;
3739
}
3840

41+
3942
public function getType(): ?string
4043
{
4144
return $this->errorType;

src/Objects/Bookmarks.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?php
22

33
namespace Neo4j\QueryAPI\Objects;
4-
4+
/**
5+
* @api
6+
*/
57
class Bookmarks implements \Countable
68
{
79
public function __construct(private array $bookmarks)

src/Objects/Node.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(array $labels, array $properties)
3030

3131
/**
3232
* Get the labels of the node.
33-
*
33+
* @api
3434
* @return string[] Array of labels.
3535
*/
3636
public function getLabels(): array
@@ -40,7 +40,7 @@ public function getLabels(): array
4040

4141
/**
4242
* Get the properties of the node.
43-
*
43+
* @api
4444
* @return array<string, mixed> Associative array of properties.
4545
*/
4646
public function getProperties(): array
@@ -50,7 +50,7 @@ public function getProperties(): array
5050

5151
/**
5252
* Convert the Node object to an array representation.
53-
*
53+
* @api
5454
* @return array Node data as an array.
5555
*/
5656
public function toArray(): array

src/Objects/Path.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(array $nodes, array $relationships)
3131

3232
/**
3333
* Get the nodes in the path.
34-
*
34+
* @api
3535
* @return Node[] Array of nodes.
3636
*/
3737
public function getNodes(): array
@@ -41,7 +41,7 @@ public function getNodes(): array
4141

4242
/**
4343
* Get the relationships in the path.
44-
*
44+
* @api
4545
* @return Relationship[] Array of relationships.
4646
*/
4747
public function getRelationships(): array

src/Objects/Person.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Neo4j\QueryAPI\Objects;
44

55
/**
6+
* @psalm-suppress UnusedClass
67
* Represents a Person node in the Neo4j graph.
78
*/
89
class Person extends Node

src/Objects/Point.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function __construct(
2323

2424
/**
2525
* Get the x coordinate of the point.
26-
*
26+
* @api
2727
* @return float x coordinate value.
2828
*/
2929
public function getX(): float
@@ -33,7 +33,7 @@ public function getX(): float
3333

3434
/**
3535
* Get the y coordinate of the point.
36-
*
36+
* @api
3737
* @return float y coordinate value.
3838
*/
3939
public function getY(): float
@@ -43,7 +43,7 @@ public function getY(): float
4343

4444
/**
4545
* Get the z coordinate of the point.
46-
*
46+
* @api
4747
* @return float|null z coordinate value, or null if not applicable.
4848
*/
4949
public function getZ(): float|null
@@ -53,7 +53,7 @@ public function getZ(): float|null
5353

5454
/**
5555
* Get the SRID (Spatial Reference System Identifier) of the point.
56-
*
56+
* @api
5757
* @return int SRID value.
5858
*/
5959
public function getSrid(): int

src/Objects/Relationship.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(string $type, array $properties = [])
3131

3232
/**
3333
* Get the type of the relationship.
34-
*
34+
* @api
3535
* @return string The type of the relationship.
3636
*/
3737
public function getType(): string
@@ -41,7 +41,7 @@ public function getType(): string
4141

4242
/**
4343
* Get the properties of the relationship.
44-
*
44+
* @api
4545
* @return array<string, mixed> Associative array of properties.
4646
*/
4747
public function getProperties(): array

src/Objects/ResultCounters.php

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

33
namespace Neo4j\QueryAPI\Objects;
44

5+
/**
6+
* @api
7+
*/
58
class ResultCounters
69
{
710
public function __construct(
@@ -23,11 +26,14 @@ public function __construct(
2326
}
2427

2528

29+
30+
2631
public function ContainsSystemUpdates(): bool
2732
{
2833
return $this->containsSystemUpdates;
2934
}
3035

36+
3137
public function containsUpdates(): bool
3238
{
3339
return $this->containsUpdates;
@@ -38,11 +44,13 @@ public function getNodesCreated(): int
3844
return $this->nodesCreated;
3945
}
4046

47+
4148
public function getNodesDeleted(): int
4249
{
4350
return $this->nodesDeleted;
4451
}
4552

53+
4654
public function getPropertiesSet(): int
4755
{
4856
return $this->propertiesSet;

0 commit comments

Comments
 (0)